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 7 years, 10 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

    CRM+Marketing Automation: A Powerful Solution to Grow your Business

    CRM+Marketing Automation: A Powerful Solution to Grow your Business

    Blog in Salesforce

    Customer relationship management(CRM) helps business owners track and manage their customer base.   CRM software is ideal for making the most of relationship development with existing…

    Automate Marketing Process, Automation, Brand Awareness, Campaign Management, Campaigns
    Melonleaf Jan 31, 2023
    1,607  Views

    How to setup an Einstein Chatbot in Salesforce?

    Blog in Salesforce Einstein

    In this article, we will discuss Einstein Chatbot and consider Omni-Channel, Lightning Knowledge Base, Embedded Service Deployment, and more. The first point to note: this…

    Article Answers, Bot Response Delay, Chat Settings, Chat Transcript, Chat User Feature
    Sparkybit Sep 20, 2023
    2,059  Views
    Email Templates in Salesforce

    Email Templates in Salesforce Classic and How To Send Them For a Particular Record

    Blog in Salesforce Admin

    Email Templates are designed for consistent mails so as to increase productivity. Before we discuss further about Email Templates, let us know about the required…

    API or APEX, Contact Manager, Customize Application, Email Templates, HTML Email Templates
    Deepak Aug 21, 2020
    13,760  Views

    Popular Salesforce Videos

    Send WhatsApp Messages from Salesforce Marketing Cloud

    Send WhatsApp Messages from Salesforce Marketing Cloud

    Video in Marketing, Salesforce Cloud Platform

    One of the longest-anticipated integrations was recently revealed by Salesforce: WhatsApp as a platform to send messages using the marketing cloud. Brands today have many…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Marketing Cloud, Salesforce Video
    Jogender Mar 10, 2021
    2,630  Views
    Salesforce Connect ( Cross-Org Adaptor ) | Salesforce Tutorial

    Salesforce Connect ( Cross-Org Adaptor ) | Salesforce Tutorial

    Video in Salesforce Training

    This video will talk about external objects using Salesforce Connect, also known as Cross-Org Adaptor. 00:00 Introduction 00:29 Introduction to Cross Org Adapter 01:51 Create…

    Salesforce Tutorial, Salesforce Video, Salesforce Learning, Salesforce Connect, Cross-Org Adaptor
    Prafull Jul 15, 2021
    1,373  Views
    What are Custom Page Layout in Salesforce?

    What are Custom Page Layout in Salesforce?

    Video in Salesforce Training, Salesforce Admin

    Custom Page Layout is creating its own layout and modifying the same layout which we have created. Watch this video to learn all about Custom…

    Salesforce Administration, Salesforce Online Training, Page Layouts, Custom Fields, Salesforce Courses
    CRS Feb 8, 2022
    2,022  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

    © 2025 - 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.