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

    Integrating and Automating B2B Sales Workflows with Custom Salesforce Integrations

    Blog in Salesforce

    When you think about the complex world of B2B sales, it’s clear that there are a lot of moving parts. Sales teams juggle multiple tasks—from…

    Amit Kumar Jul 22, 2024
    135  Views

    4 Phases of Salesforce Classic to Lightning Migration

    Blog in Lightning

    Salesforce Classic to Lightning Migration offers you access to better UI, new features, and more opportunities to scale. When Salesforce Lightning was launched in 2015,…

    Business Goals, Business Leaders, Business Leadership, Business Performance, Change Management Plan
    Damco Aug 17, 2022
    4,008  Views
    Display parent fields value on standard lightning data table

    Know How To Display Parent Fields Value On A Standard Lightning Data Table

    Blog in Lightning

    As we all know lightning data table has a limitation in directly displaying parent fields value related to the child object. However, we have a…

    Data Table, Formula Field, Lightning Component Helper, Lightning Components, Salesforce Fields
    Dhirendra Oct 10, 2019
    11,059  Views

    Popular Salesforce Videos

    Salesforce Data Archive along with Files

    Salesforce Data Archive along with Files

    Video in Data

    This video tries to explain the way true archive of records as well as the files in Salesforce. Archive files along with the DataArchiva, We…

    Salesforce Tutorial for Beginners, Salesforce Data Management, Best Salesforce Tutorials, Salesforce Tutorials, Free Salesforce Tutorials
    Abhay May 24, 2018
    3,872  Views
    5 Benefits of Integrating Mulesoft Into Your Business | Salesforce Integration

    5 Benefits of Integrating Mulesoft Into Your Business | Salesforce Integration

    Video in Salesforce Integration

    The MuleSoft integration solution has provided visionaries throughout the world with the power to connect all their data, systems, and devices seamlessly. Swipe to know…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, Salesforce Video
    Cyntexa Jul 5, 2022
    1,373  Views
    Salesforce Integration Cloud - Connect Devices, Data and Customers

    Salesforce Integration Cloud - Connect Devices, Data and Customers

    Video in Salesforce Integration

    Salesforce Integration Cloud incorporates an arrangement of services and tools that make it simple for clients to surface their information paying little attention to where…

    Salesforce Integration, URL Mapping, Salesforce Data, Salesforce Commerce Cloud, User Experience
    Abhay Apr 19, 2018
    2,463  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.