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
  • 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
    • Contact Us
    • Discussions
    Close search

    Different types of relationships in Salesforce

    Udit Feb 20, 2020
    37,576  Views

    Hello all, as the name suggests, in this blog, you will get to know about relationships between objects in Salesforce, what types of relationships are there in Salesforce and how they behave.

    In terms of Salesforce, relationships tell us how two or more objects relate with each other or it is a bi-directional association between objects. Suppose we have to relate two objects in Salesforce so that their functionality depends upon each other, then we use relationships to create a link between them. Salesforce platform allows the following relationships:

    Don’t forget to check out: How to Create Relationship between fields in Salesforce using Look up and Master Detail

    1. Master-Detail relationship
    2. Look Up relationship
    3. Many-to-Many relationship
    4. Self-relationship
    5. External relationship

    1. Master-Detail relationship:

    In this type of relationship, one object acts as a master and other act as a detail object. In other words, this relationship acts as a parent-child relationship. We use this type of relationship when we want to bound two objects tightly or closely dependent on each other.

    The behavior of Master-Detail relationship:

    1. When a master record gets deleted, its related child/detail record automatically gets deleted.
    2. In a master-detail relationship both the objects are strongly coupled to each other.
    3. Sharing and security settings of the detail records are inherited as per their master settings.
    4. We can define this relationship in between custom objects and in between standard and custom objects. Note that, the standard object must be on the master side while creating relationships between standard and custom objects. 
    5. We can also have roll-up summary fields in master-detail relationships which helps us to calculate values from child records by using aggregate functions like Count, Sum,  Min, Max.
    6. The master-detail field is required on the detail record’s page layout.
    7. We can only create a maximum of 2 master-detail relationships per object. In a master-detail relationship both the objects are strongly coupled to each other.

    2. Look Up relationship:

    In this, both objects are loosely coupled, which means that if one gets deleted then the related object will not get deleted.

    The behavior of the Look-Up relationship:

    1. In this, objects are loosely coupled.
    2. When a parent’s record gets deleted, the child remains in existence.
    3. We cannot create a roll-up summary field in a lookup relationship.
    4. Parent and child records have their own sharing and security settings in look-up relationships.
    5. The Look-Up relationship field is not mandatory by default but we can select a checkbox to make it mandatory in lightning.
    6. We can have a maximum of 40 look-ups per object.

    Some important points to remember:

    1. If we delete a child record and then restore it from the recycle bin, the master-detail relationship gets lost at the time of deletion and does not get restored after child/detail getting restored.
    2. To convert a master-detail to look-up we have to check that there is no roll-up summary field available and can convert a look-up to master-detail if lookup field in all records contains a value.

    3. Many-to-Many relationships:

    In many-to-many relationships, records of particular objects are linked to multiple records of different objects and vice versa. There is no such field as a many-to-many relationship in Salesforce, we can create a many-to-many relationship by creating two master-detail relationships with a common object. This common object can also be specified as the junction object.

    4. Self-relationship:

    Self-relationship simply means creating a relationship with itself. In this, we can relate an object with itself by look-up. Example: Account object has a field called Parent Account which shows the self-relationship in Account.

    5. External relationship:

    This is a new field type that has been introduced with Salesforce Connect. To link an external object to another external object, we use the external relationship field. It supports standard look-up relationships that use 18 characters Salesforce Id for the association.

    Categories: Salesforce Admin
    Tagged: Custom Objects, External Relationships, Lookup Field, Parent Account, Salesforce Connect, Salesforce Master Detail Relationship, Salesforce Objects, Salesforce Relationships
    salesforce consultants
    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.