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

    Salesforce Hacks

    Salesforce Hacks for a Successful Admin/Developer

    Blog in Salesforce customization

     1.) Salesforce Merge more than 3 Accounts at Once. With the Merge Accounts page provided by official SFDC selection screen, a user can only Merge at most of…

    Managing Duplicates, Salesforce Customization, Salesforce Developers, Salesforce Fields, Salesforce HACKS
    Manpreet Mar 22, 2017
    13,320  Views
    Salesforce Marketing Cloud Integration with Google Analytics 360

    Redefining the future of Marketing – Salesforce Marketing Cloud Integration with Google Analytics 360

    Blog in Salesforce integration

    Know your customers better and make smarter, insight-based marketing decisions through Salesforce’s massive customer relationship management platform twinned with Google Analytics 360’s market-leading digital analytics solution…

    Google Analytics 360, Marketing Cloud, Salesforce, Salesforce Integration, salesforce integration with google analytics
    LevelShift (formerly DemandBlue) Jul 31, 2018
    2,742  Views

    MuleSoft's New AsyncAPI Support Enhances AI-Powered Customer Interactions

    Blog in Others

    MuleSoft has launched an open beta for AsyncAPI support in its Anypoint Platform to facilitate the adoption of event-driven architectures (EDAs). This feature enables businesses…

    API Design, API Specifications, Application Development, AsyncAPI Support, Configuration-Driven
    Cloudmetic Jul 18, 2024
    890  Views

    Popular Salesforce Videos

    Build Your First Custom App On Salesforce

    Build Your First Custom App On Salesforce

    Video in Others

    Lightning App Builder makes it super simple to quickly assemble apps using just declarative drag and drop features. This video covers how to upgrade a…

    Salesforce Records, Salesforce Lightning, Salesforce Apps, Lightning App Builder, Salesforce Lightning Page
    Prafull Apr 2, 2018
    2,164  Views
    Salesforce CPQ Bundles - Why You Need Them and How to Create a Bundle

    Salesforce CPQ Bundles - Why You Need Them and How to Create a Bundle

    Video in Salesforce Products

    Salesforce CPQ stands for Configure, Price, and Quote. This tool simplifies the whole process of configuring product bundles, pricing them, and generating quotes for customers.…

    salesforce, Salesforce CPQ, Salesforce Admin, CPQ, Salesforce Administrators
    ENWAY Nov 2, 2023
    1,166  Views
    Run UI Tests with UTAM | Salesforce Developer Tutorial

    Run UI Tests with UTAM | Salesforce Developer Tutorial

    Video in Salesforce Training, Salesforce Development

    Testing apps is critical to ensure quality and there are different types of tests such as unit tests, integrations tests or end-to-end tests just to…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Video, salesforce app
    Abhishek Jun 29, 2022
    3,631  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.