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, 9 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

    Salesforce business

    What Is Salesforce? How Is It Used and How Does It Impact Business?

    Blog in Salesforce

    More than 80% of the Fortune 500 companies in the world use at least one Salesforce app. Such is the deep impact and penetrative power…

    API, App Building, app development, AppExchange Ecosystem, Business Activities
    SP Oct 15, 2020
    4,352  Views

    Features of Salesforce Commerce Cloud: Enhancing the Shopping Experience

    Blog in Salesforce

    Commerce Cloud is a key part of the Salesforce Customer Success Platform and offers ecommerce solutions for B2C (business-to-consumer) and B2B (business-to-business) customers. That means…

    Artificial Intelligence, Commerce Cloud, Customer Satisfaction, E-commerce Solutions, Integration
    Infodriven Apr 25, 2024
    880  Views
    How to use jQuery DataTable Plugin In Salesforce Lightning Component?

    How To Use jQuery DataTable Plugin In Salesforce Lightning Component?

    Blog in Lightning, Salesforce Implementation

    DataTables: "DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, build upon the foundations of progressive enhancement, that adds…

    Javascript in Salesforce, jQuery, jQuery DataTable Plugin, jQuery in Salesforce, jQuery Library
    Aman Apr 20, 2018
    13,482  Views

    Popular Salesforce Videos

    Things You Must Know About Salesforce Desk.com

    Things You Must Know About Salesforce Desk.com

    Video in Salesforce Implementation

    Salesforce Desk.com is an all-in-one customer support application which is completely cloud based and which gives you the ability to buy services on per agent…

    Salesforce Integration, Salesforce Customization, Customer Success, Automate Business Processes, Salesforce App Development
    Algoworks Mar 27, 2018
    1,812  Views
    'Reduce Internal Email Clutter, Use Salesforce Chatter To Simplify Life' Webinar

    'Reduce Internal Email Clutter, Use Salesforce Chatter To Simplify Life' Webinar

    Video in Salesforce Training

    Chances are, that as a Salesforce user, you aren’t using Chatter or aren’t aware of the power and value Chatter brings to team collaboration. Which…

    Salesforce Training, Salesforce Chatter, salesforce, Salesforce Webinar, Salesforce Video
    360 Degree Apr 4, 2022
    2,229  Views
    Agile in Salesforce | Agile Salesforce Implementation

    Agile in Salesforce | Agile Salesforce Implementation

    Video in Salesforce Implementation

    Watch this video to learn about Agile Salesforce Implementation When Salesforce met Agile Agile vs Waterfall Introduction to Scrum Scrum Roles Scrum Ceremonies Q&A

    Salesforce Training, Salesforce Tutorial, Salesforce Implementation, Salesforce Video, Salesforce Learning
    Jogender Jun 29, 2021
    2,764  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.