Difference Between Master-Detail Relationship And Lookup Relationship

Difference between master-detail relationships and lookup Relationships

Hello, Friends, I am very happy to tell you all with this useful information. This post is only for Beginners. And for the experienced persons, this post helps them to refresh the things which they already know.

Master-detail relationship:

  1. You can define master-detail relationships between custom objects or between a custom object and a standard object (standard object must be the parent).
  2. When a record in a master object (parent) is deleted, all the records in the detail object (child) that are related to that master record will be deleted.
  3. All child records must have a related parent record.
  4. The ownership of the child record is determined by the related parent record. Child records do not have an owner.
  5. The detail record inherits sharing and security from the master record.
  6. To relate an object to another object, no records should exist in the child object.
  7. If you have the Roll-Up Summary field in the parent object, and create, edit, or delete action in the child record will trigger an edit action in the parent object. If you have a validation rule and other rules in the parent object, the validation rules will trigger for the parent object.
  8. Supports cross-object workflow. You can configure a field update action to update a field in the parent record using a value from the child record.

Lookup relationship:

  1. You can define a relationship between any two objects, standard or custom.
  2. When a parent object is being deleted, you can configure a child object to either clear the parent record value in the child record or prevent deletion of the parent record.
  3. The parent record may not require a related parent record.
  4. Each child record has an owner and is not related to the parent record.
  5. There is no security or inheritance between related parent and child records.
  6. To relate an object to other objects, there is no condition on the number of records.
  7. You cannot create the Roll-Up Summary field in the lookup relationship using out-of-the-box Salesforce functionality.
  8. Does not support cross-object workflow.

To create a master-detail relationship for an existing object with records as the child object, you can initially define it as a lookup relationship, populate all parent fields for all records, and then change the relationship to a master-detail relationship.

You can build a many-to-many object relationship using two master-detail relationships in a single custom object, which is known as a junction object in that case.

Stay tuned to salesforceupdates.com for more updates.

Thank you so much for reading my post. Feel free to ask doubts/Queries in the comment section below, and I’ll come again with an interesting topic about Salesforce So Please Share, Subscribe to our blog for the latest update.

No Responses

Leave a Reply