Toggle Side Panel

  • Blogs
  • 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
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • 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
    • 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, 7 months 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

    Popular Salesforce Blogs

    Benefits of Salesforce for Non-Profits

    Blog in Others

    The non-profit organization seems to benefit the most out of the Salesforce CRM application compared to other CRM solutions. Non-profit Communities There are numerous communities…

    Benefits of Salesforce, CRM Solutions, Salesforce AppExchange, Salesforce CRM, Salesforce for Non-Profits
    William Apr 8, 2019
    2,826  Views

    Salesforce Managed Services: Your Key to CRM Success

    Blog in Salesforce

    For businesses, CRM is not just another business system; it is the foundation for customer satisfaction, revenue development, and data-driven decision-making. When CRM functions efficiently,…

    Salesforce, Salesforce Consultant, Salesforce Consulting, salesforce partners
    SP Feb 27, 2026
    418  Views

    Top Sales Challenges in 2023 Which Salesforce Sales Cloud Can Solve

    Blog in Salesforce

    There’s no denying the fact that a sales job is full of challenges. Sales managers are constantly on the lookout for ways to optimize their…

    Assessment, Automated template, Automation, Bad Hiring, Boosting business ROI
    Damco Jul 25, 2023
    1,995  Views

    Popular Salesforce Videos

    What is Lead Assignment rule in Salesforce and How to create it?

    What is Lead Assignment rule in Salesforce and How to create it?

    Video in Salesforce Implementation, Salesforce Training

    This video explains Lead Assignment rules in depth in an interesting way and fun way. This video is divided into 4 parts: - What is…

    salesforce training videos for beginners, Salesforce Online Training, Salesforce Training Videos, Free Salesforce Training, Salesforce Records
    Prafull Feb 13, 2018
    2,349  Views
    Salesforce Education Cloud Consultant: Interview Questions

    Salesforce Education Cloud Consultant: Interview Questions

    Video in Salesforce Cloud Platform

    Salesforce org Education Cloud is the complete customer relationship management software for colleges and universities, helping you track all of your constituent relationships, from prospects…

    Salesforce Training, Salesforce Tutorial, Salesforce Consultant, salesforce, Salesforce Org
    Rupal Kakkar Apr 18, 2022
    1,879  Views
    Salesforce Lightning Tutorial | Salesforce Developer Training for Beginners

    Salesforce Lightning Tutorial | Salesforce Developer Training for Beginners

    Video in Lightning

    This salesforce developer training for beginners video is a salesforce lightning tutorial where you will learn introduction to salesforce, salesforce components, salesforce lightning, lightning vs…

    Salesforce Training, Salesforce Lightning, salesforce, Salesforce Developers, Salesforce Lightning Platform
    Rupal Kakkar Apr 7, 2020
    2,325  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®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.