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

    application solution

    Popular Salesforce Blogs

    Process Builder in Salesforce

    Learn All About Process Builder in Salesforce and Its Features

    Blog in Salesforce Apex

    Would you like to make a record for any item from a work process? Would you like to call your Apex class from a work…

    Business Measures, Canvas, Catch Bar, Client, clone
    rajesh andani Sep 30, 2021
    3,435  Views
    Alert Triggers in Twilio

    Alert Triggers in Twilio!

    Blog in Others

    What are Alert Triggers? Alert Triggers are nothing but alerts via webhook or mail you when number of error events cross the Trigger Value on…

    emails, HTTP request, Salesforce Account, Salesforce Triggers, Trigger Value
    shariq Sep 12, 2018
    5,155  Views

    Hire the Best Salesforce Implementation Partners in USA

    Blog in Salesforce

    Scaling a business in today’s digital landscape requires more than just a CRM; it requires a powerhouse ecosystem that aligns your sales, marketing, and service…

    Hire Top Salesforce Implementation Company, Salesforce Development Companies, Salesforce Implementation Agency, salesforcedeveloper
    Dean Mar 30, 2026
    9  Views

    Popular Salesforce Videos

    What are lookup filters in Salesforce?

    What are lookup filters in Salesforce?

    Video in Salesforce Implementation

    In this video, we will leaarn about Lookup Filters in Salesforce by dividing this topic into 4 basic points, which are: 1. What is a…

    Salesforce Records, Salesforce Lightning, Salesforce Implementation, Salesforce Data Management, Salesforce Objects
    Jogender Apr 5, 2018
    3,236  Views
    Marketing Cloud | Salesforce Send Email

    Marketing Cloud | Salesforce Send Email

    Video in Marketing, Salesforce Cloud Platform

    There are two ways to send an email in Marketing Cloud; Guided Send Wizard & Salesforce Send Email. The benefit of the Salesforce Send Email…

    Salesforce Cloud, Salesforce Cloud Platform, Salesforce Video, Salesforce Learning, Marketing Cloud
    Prafull May 15, 2020
    2,749  Views
    Configuration Attribute In Salesforce CPQ | Salesforce Development Tutorial | Learn Salesforce Series by Algoworks

    Configuration Attribute In Salesforce CPQ | Salesforce Development Tutorial | Learn Salesforce Series by Algoworks

    Video in Salesforce Training

    Configuration attributes can be used in setting up the value of multiple shared product option fields simultaneously in Salesforce CPQ. In this Salesforce tutorial, you…

    Salesforce Training, Salesforce Tutorial, Salesforce CPQ, Salesforce Development Tutorial, Salesforce Video
    Algoworks Nov 30, 2020
    7,930  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.