Home > DeveloperSection > Forums > Look-up VS Master-Detail Relationship in SalesForce
Royce Roy
Royce Roy

Total Post:134

Points:938
Posted on    March-04-2015 7:29 AM

 Sales Force Cloud Computing  SFDC  DEV-401 
Ratings:


 2 Reply(s)
 714  View(s)
Rate this:
I am new to Salesforce, I am very confuse about look- up relationship and Master- Detail Relationship in Salesforce. Please tell me some differences between the two relationships.


Samuel Fernandes
Samuel Fernandes

Total Post:154

Points:1082
Posted on    March-04-2015 7:32 AM

Master – Detail Relationship :

  1. If we delete master records then detail (Child) records are deleted.
  2. It creates the parent(master) child(Detail) relationship between objects.
  3. Child records do not have Owner fields it takes parents records owner as child records owner.
  4. We can have maximum 2 master details on an object
Look up relationship :

  1. Look up relationship creates relations between two objects.
  2. If we delete any object then other object is not deleted.
  3. We can have maximum 25 lookup on an object.

Mayank Tripathi
Mayank Tripathi

Total Post:397

Points:3117
Supported
Posted on    March-04-2015 7:35 AM

Master-detail relationship

  1. 1)in MD relationship field value is mandatory
  2. 2) here parent record is deleted automatically child records is deleted
  3. 3) an object is allowed only 2 m-d relationship fields
  4. 4) if we give any rules to parent that rules automatically goes to the child. Child does not conatin any seperate rules.
  5. 5)we can directly conert m-d relationship to lookup relationship
  6. 6) if we give a value to m-d relationship field that value doesnot changed.



Lookup relationship

  1. 1)in lookup relationship field value is not mandatory
  2. 2) here parent record is deleted automatically child records are not deleted
  3. 3) an object is allowed only 25  relationship fields
  4. 4) here parent rules and child rules are may be same or not.
  5. 5)if we cannot give a value to the lookup field then we can't  directly conert lookup relationship to master-detail relationship here first we need to give a value to the lookup field.
  6. 6) if we give a value to lookup relationship field we can change that value whenever we required.

hope this wil help you understand the difference between the two :)

Don't want to miss updates? Please click the below button!

Follow MindStick