Activity › Forums › Salesforce® Discussions › What is the difference between master detail and many to many relationship in Salesforce?
Tagged: Difference, Many To Many Relationships, Master Detail Relationship, Salesforce Relationships
-
What is the difference between master detail and many to many relationship in Salesforce?
Posted by Divya on November 2, 2018 at 12:44 PMwhat are the use cases of many to many relationship.
Achintya replied 6 years, 9 months ago 3 Members · 2 Replies -
2 Replies
-
You can define multiple relationships between objects and two popular choices are master-detail relationships and many to many relationships in Salesforce. A master-detail relationship can be defined as the parent-child relationship where the master object controls the behavior of the detail object. For many-to-many relationships, one record of a particular object can be connected to multiple records of other objects simultaneously.
- [adinserter block='9']
-
Master-detail relationship
1)in master-detail relationship field value is mandatory
2) here parent record is deleted automatically child records is deleted
3) an object is allowed only 2 master-detail relationship fields
4) if we give any rules to parent that rules automatically goes to the child. Child does not contain any separate rules.
5)we can directly convert master-detail relationship to lookup relationship
6) if we give a value to master-detail relationship field that value does not change.Lookup relationship
1)in lookup relationship field value is not mandatory
2) here parent record is deleted automatically child records are not deleted
3) an object is allowed only 25 relationship fields
4) here parent rules and child rules are maybe same or not.
5)if we cannot give a value to the lookup field then we can’t directly convert lookup relationship to master-detail relationship here first we need to give a value to the lookup field.
6) if we give a value to lookup relationship field we can change that value whenever we required.
Log In to reply.