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.
- You can define master-detail relationships between custom objects or between a custom object and a standard object (standard object must be the parent).
- 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.
- All child records must have a related parent record.
- The ownership of the child record is determined by the related parent record. Child records do not have an owner.
- The detail record inherits sharing and security from the master record.
- To relate an object to another object, no records should exist in the child object.
- 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.
- 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.
- You can define a relationship between any two objects, standard or custom.
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.
The parent record may not require a related parent record.
- Each child record has an owner and is not related to the parent record.
- There is no security or inheritance between related parent and child records.
- To relate an object to other objects, there is no condition on the number of records.
- You cannot create the Roll-Up Summary field in the lookup relationship using out-of-the-box Salesforce functionality.
- 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.