Difference Between Master-Detail Relationship And Lookup Relationship
Master-Detail Vs Lookup : Now we are going to discuss Master-detail and Lookup relationship. In Salesforce we have two types of relationship. We can easily relate the objects. The relationship types are given below, check it you will have an idea about salesforce relationships limitations, diffrence, and advantages.
1.Master-Detail Relationship
- One – Many Relationships.
- Many – Many Relationships.
2.Lookup relationship
- Self Lookup.
- External Lookup.
Master-detail relationship |
Lookup relationship |
First of all master-detail relationships between custom objects or between a custom object and a standard object. (standard object will be the parent) | Its between any two objects, standard or custom. |
A record in a master object (parent) is deleted, the records in the detail object (child) record will be deleted. | A parent object is 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. |
The Parent object is must to create the relationship. | The is not required here. |
The child record is determined by the related parent record. Child records do not have an owner.that’s why parent object is must here. | Each child record has an owner and is not related to the parent record. |
The security and records are inherited from the parent. | No inheritance process from parent to child. |
To Implement this relationship, no records should exist in the child object. | There is no limitation like that. |
Rollup summary is possible here. | Rollup summary is not possible here. |
Cross-object workflow possible here. | Cross-object workflow not possible here. |
To create a master-detail relationship for an existing object with records. First you need to define it as a lookup relationship then populate all records. After that change the relationship like lookup to master-details relationship.
You can implement a many-to-many object relationship in two master-detail relationships using junction object.