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

    Web Server Authentication Flow

    Understanding Web Server Authentication Flow | Web App Integration

    Blog in Salesforce Apex

    Integration Using Web Server Flow Allows apps with a secure client-server (private key or anything that can protect the private key) to access protected resources.…

    API, Applications, Apps, Authentication Server, Client App
    Mohit Kumar Nov 1, 2022
    2,796  Views
    How to use Leaflet Map in Salesforce?

    How to use Leaflet Map in Salesforce?

    Blog in Salesforce Implementation

    Leaflet Map: Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. The leaflet is designed with simplicity, performance, and usability in mind. Let's…

    CDN, Content Delivery Network, Google Maps in Salesforce, Leaflet, Leaflet Map
    Parv Shekhar Singh May 31, 2018
    10,965  Views
    Salesforce Apex to Flow

    Salesforce Apex to Flow - For Starters with a Very Simple Example

    Blog in Salesforce Apex, Salesforce Tutorial

    APEX Code Into Flow We have many times heard, implemented and worked with Flows. There are many sites and videos available which would give you…

    Apex Programming, Apex Queue, API Name, AURA, Auto Launched Flows
    Harika Madiraju Dec 5, 2022
    2,470  Views

    Popular Salesforce Videos

    Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial

    Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial

    Video in Lightning, Salesforce Training

    Don't miss this new interchange session with Jorge Ortega and Alba Rivas! They'll discuss how to build an LWC that allows you to easily create…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Lightning Tutorial, LWC
    Rupal Kakkar Nov 15, 2021
    2,603  Views
    Customer Lifecycle Analytics | Salesforce

    Customer Lifecycle Analytics | Salesforce

    Video in Others, Salesforce Stories

    Customer Lifecycle Analytics, built on Tableau CRM, helps you glean even more value from your Salesforce Surveys and Salesforce Feedback Management responses with embedded analytics…

    Salesforce Training, salesforce, Salesforce Video, Salesforce Learning, Salesforce Surveys
    Neha Yadav Jan 29, 2021
    2,110  Views
    What is Salesforce | Salesforce CRM Tutorial For Beginners | Salesforce Training

    What is Salesforce | Salesforce CRM Tutorial For Beginners | Salesforce Training

    Video in Salesforce Training

    This Salesforce Training Video will help you understand what is a CRM ( Customer Relationship Management ), why we need Salesforce CRM and how some…

    Salesforce Training, Salesforce Certification, What Is Salesforce, Salesforce Implementation, Salesforce Course
    Simplilearn Apr 23, 2019
    2,587  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.