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

    What are Scheduled-Triggered Flows in Salesforce

    What are Scheduled-Triggered Flows in Salesforce?

    Blog in Others

    Schedule-Triggered Flow (or Scheduled Flow) is a Salesforce Flow that launches automatically and repeats itself at certain intervals.  For a batch of records, a schedule-triggered…

    Apex Schedule Jobs, Auto Launched Types, Autolauched Flow, Autolaunched Flow, automated process
    Sejal Agrawal Feb 2, 2023
    2,949  Views

    Questions to Ask Before Hiring the Services of a Salesforce Partner

    Blog in Salesforce Consultant

    To sustain in this era of cutthroat competition, maintaining superior customer relationships has become the need of the hour. This can be possible by providing…

    AppExchange, Business, Business Ecosystem, Business Issues, Consultants
    Girikon May 10, 2022
    2,981  Views
    Hello World Code for Salesforce Einstein

    Hello World Code for Salesforce Einstein

    Blog in AI and ML

    As a programmer, We do code in many languages. We create always a program named as Hello World. This blog is all about for Hello…

    Artificial Intelligence, Machine Learning, Salesforce Einstein, Salesforce Einstein Language
    0to1Code.Com Aug 29, 2017
    7,262  Views

    Popular Salesforce Videos

    Introduction to SOQL in Salesforce

    Introduction to SOQL in Salesforce

    Video in Salesforce Training

    This video explains what is SOQL or Salesforce Object Query Language in Salesforce technology with examples from daily life for your better understanding .

    Free Salesforce Training, Salesforce Integration, Apex, Salesforce Objects, Easy Way To Learn Salesforce
    Prafull Nov 27, 2018
    1,976  Views
    Algoworks Is Now A Salesforce Summit (Platinum) Partner | Salesforce Consulting Services

    Algoworks Is Now A Salesforce Summit (Platinum) Partner | Salesforce Consulting Services

    Video in Salesforce Consultant

    It's been just a year since we became Salesforce gold consulting partners. Algoworks has now been recognized as a Salesforce Summit Partner (also known as…

    Salesforce Training, Salesforce Tutorial, salesforce, salesforce consulting services, Salesforce Video
    Algoworks May 10, 2022
    1,415  Views
    Salesforce: Learn Workflow Rules in Just 10 min

    Salesforce: Learn Workflow Rules in Just 10 min

    Video in Salesforce Workflow

    Workflows in Salesforce are a fantastic way to automate certain business processes. You can create a rule, and based on certain criteria that you set,…

    Salesforce Tutorial, Salesforce Developer, Salesforce Records, Salesforce Administrator, Salesforce Objects
    Portia Nov 22, 2018
    2,114  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.