Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Marketplace
    • Advertise With Us
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › SOQL to fetch account details through a AccountContactRelation object in Salesforce

    Tagged: Account Detail, Contact Record, Custom Relationship, Salesforce Org, Salesforce SOQL

    • Salesforce® Discussions

      SOQL to fetch account details through a AccountContactRelation object in Salesforce

      Posted by Martina on November 20, 2017 at 7:51 PM

      Hi,

      I am stuck with a problem here.

      I have enabled multiple Accounts to Contact in my salesforce org. This creates a junction object called AccountContactRelation.

      I need to write a query which would fetch the account details like Account id, name, record type of the Accounts linked to a Contact.

      Condition is, only those account details should be fetched where the contact has more than one account linked to it.

      Can someone please help. It is urgent

      Thanks!

      Manpreet replied 8 years ago 2 Members · 1 Reply
      • Account Detail
      • Contact Record
      • Custom Relationship
      • Salesforce Org
      • Salesforce SOQL
    • 1 Reply
    • Manpreet

      Member
      January 17, 2018 at 7:49 AM

      Hi Martina,

      You can use SOQL Query something Like this :

      [Select AccountId from Account group by ContactId having count(Name) > 1];

      Thanks.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    application solution

    Popular Salesforce Blogs

    Top New Salesforce Winter ’20 Features

    Blog in Salesforce Releases

    Salesforce is back with Winter Release. Every year, Salesforce announces three releases packed with features that enhance the Salesforce experience for the admins, developers, and Salesforce users.These…

    Custom Objects, Salesforce Lightning, Salesforce new Features, Salesforce Winter 20 Features, Trigger
    LevelShift (formerly DemandBlue) Sep 12, 2019
    4,259  Views

    DevOps For Salesforce - All You Need To Know

    Blog in Salesforce

    While most modern software development is Agile, small and medium scale businesses do not have the opportunity nor the resources to move in that direction. Most…

    Automation of Deployments, Business, Configuration Changes, Customer Feedback, Customized System
    SP Oct 19, 2020
    4,670  Views
    Batch Class in Salesforce

    All About Batch Class in Salesforce | The Developer Guide

    Blog in Salesforce Apex

    Batch Apex is used to run large jobs (think thousands or millions of records!) that would exceed normal processing limits. Each time you invoke a…

    Batch, Batch Apex, Batch Class, Batch Class Code, Batch Class in Salesforce
    Arpit Oct 26, 2021
    4,346  Views

    Popular Salesforce Videos

    Learning Path and Pay Scale for Salesforce Profiles

    Learning Path and Pay Scale for Salesforce Profiles

    Video in Salesforce Training

    Now it's high time to know about the Learning Path for the different Salesforce profiles. In this video, you also got to know about the…

    Salesforce Training, Salesforce Tutorial, Salesforce Jobs, Salesforce Ecosystem, Salesforce Video
    S2 Jan 24, 2022
    2,151  Views
    How Easy (or Difficult) is it to Transition from Salesforce Classic to Lightning Experience?

    How Easy (or Difficult) is it to Transition from Salesforce Classic to Lightning Experience?

    Video in Lightning

    This video answers the question of: How Do You Transition Your Company from Salesforce Classic to Lightning Experience? ▪️ How difficult is it? ▪️ How long should…

    Salesforce Lightning, Salesforce Lightning Experience, Salesforce Implementation, Salesforce CRM, Learn Salesforce
    Pooja Feb 26, 2018
    2,209  Views
    Schedule Batch Apex | Asynchronous Apex in Salesforce | Learn Salesforce Development

    Schedule Batch Apex | Asynchronous Apex in Salesforce | Learn Salesforce Development

    Video in Salesforce Apex

    Watch this video tutorial to learn how to schedule batch apex in Salesforce. If you have any doubts or concerns do let us know in…

    Salesforce Training, Salesforce Tutorial, Salesforce Apex, Learn Salesforce Development, Salesforce Video
    Prafull Mar 9, 2022
    2,219  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.