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

    Are You Here To Know Reasons To Hire Salesforce Developer For Your Business?

    Blog in Salesforce

    Are you here because you want to discover why you should hire a Salesforce developer is crucial for your business? In today's rapidly evolving technological…

    App Builder, Application, architect, Automation, B2C Commerce Developer
    Algoworks May 29, 2023
    1,429  Views

    Salesforce Features To Help Your Nonprofit Organization Succeed

    Blog in Salesforce, Salesforce Cloud Platform

    The impacts of non-profit organizations are undeniable, especially when it comes to the people and communities they serve. They have likely changed and touched the…

    Build Better Applications, Business Organizations, Collaboration, Communication and Cloud, communities
    Apphienz Mar 30, 2021
    1,898  Views
    Lookup Relationship in Salesforce

    Lookup Relationship in Salesforce - Here's All You Need to Know

    Blog in Salesforce

    Introduction Lookup Relationship is an object type relationship in Salesforce. It is one to one or one to many relationships between two objects. Some Features…

    Child Object Record, Child Relationship Name, Custom Objects, custom report type, Data Type
    Rajat Shende Mar 4, 2022
    4,237  Views

    Popular Salesforce Videos

    Salesforce Data Loader | Import Relational Data

    Salesforce Data Loader | Import Relational Data

    Video in Salesforce Products, Salesforce Training

    What is Data Loader and How to use it to import or export data to or from Salesforce? 00:00 What is Data Loader 01:00 How…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Data Loader, Salesforce Org
    Pooja Aug 19, 2021
    2,568  Views
    What is Audit Trail in Salesforce? Explain in Detail

    What is Audit Trail in Salesforce? Explain in Detail

    Video in Salesforce Admin

    Audit Trail helps to track the recent setup changes and is especially useful in organizations with multiple administrators. Learn all about it here.

    Salesforce Training, Salesforce Tutorial, Salesforce Online Training, salesforce, Salesforce Apex Class
    CRS Mar 3, 2022
    1,835  Views
    Pardot vs Marketing Cloud: What's The Difference?

    Pardot vs Marketing Cloud: What's The Difference?

    Video in Salesforce Products, Salesforce Cloud Platform

    There are different functions of each Salesforce product according to the use cases. Many businesses get confused between Salesforce Pardot and Marketing cloud. Pardot is…

    Salesforce Training, Salesforce Tutorial, Lead Management, salesforce product, Salesforce Learning
    Cyntexa Dec 29, 2022
    1,498  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.