Activity Forums Salesforce® Discussions What is the Difference between Master Detail and Lookup Relationship in Salesforce?

  • Laveena

    Member
    August 22, 2019 at 4:46 am

    Hi Somendra,

    The key difference is master-detail has a direct dependency between the objects:

    You cannot have a detail record without a master.
    The detail record inherits sharing rules from the master.
    You cannot update the relationship to the master in a master-detail relationship.
    The number of master-detail relationships you can use are limited.
    You cannot set profile object permissions for a detail record
    Master-detail relationships are automatically included in report record types
    When you delete the master it will cascade delete all detail records relating to that master. A typical use of a Master-Detail would be the classic Sales Order and Sales Order Items objects.

    Lookups are generally for use where you may or may need to have a relationship between two objects (but not always).
    Lookups are generally used to reference commonly shared data, such as reference data.
    Lookups are used to link two objects together when you don't want the behaviour of the master-detail - particularly around sharing rules, profile permissions and cascade delete.
    Lookups are used when you need to relate multiple 'parents' to the detail record.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos