You need to sign in to do that
Don't have an account?
elghoul_girl
Difference between Lookup Relationship and Master-Detail RelationShip
Hello Everybody,
I am new in SalesForce. I don't understand what is the difference between the lookup and master-details relationships. Both are one to many relation ship.... and I can't imagine while developing when I should use each.. So, please advice
Thank you,
Sally
There's fundamental differences in the behaviour and record sharing that you need to read up on. The following is purely a summary from memory and may not be 100% accurate, please refer to the salesforce help for a full explanation.
The key difference is master-detail has a direct dependency between the objects:
When you delete the master it will cascade delete all detail records relating to that master. A typical use of a Master-Detail would be the classic Sales Order and Sales Order Items objects.
You can change between a master-detail and a lookup after you create the field. My recommendation is always start with a Lookup relationship and then if you decide you need the features of a master-detail change it. If the detail object has it's own tab then you probably want to use a lookup not a master-detail.
HTH
You mention once you create a lookup relationship you can change it to a master-detail relationship. How do you actually do this?
Yeah you can do that by editting the custom field i.e, related to lookup relation and then change the datatype to master-detail relationship.
Loookup : Master :
Loosely coupled Tightly coupled
Max number of lookup is 25 Max number of master is 2
Not a mandatory Mandatory
Once value is assigned can be changed Cannot be changed
Partent delete child cannot delete parent delete child also delete
cannot on lookup Roll up can be made on master-detail
Hi , am new to salesforce technology... As raghavendra reddy .d mentioned clearly i have a doubt regarding
Not a mandatory , mandatory...
can u plz clear about it
In Lookup, it's not mandatory to specify which is the parent record to your child. Where as in Master-detail, we have to specify the parent record for the child record. That's what Not a mandatory and mandatory means in this case.
Regards,
Archana.
It can be done choosing the option "Reparentable Master Detail" on creation of the master-detail relationship.
This type of relationship links two objects together. This is loosely bounded. We can use lookup when objects are only related in some cases. Objects in lookup relationship usually work as standard alone objects.
Master-Detail Relationship: -
This is Parent (Master) Child (Detail) relationship in which the master object controls certain behaviors of the detail object. This is tightly bounded.
For Ex – In program Event Management with a Master-Detail between Events and Budget, you can delete the Event and the entire related Budget.
For example, how do I determine if a relationship is a lookup relationship?
1)in m-d relationship field value is mandatory
2) here parent record is deleted automatically child records is deleted
3) an object is allowed only 2 m-d relationship fields
4) if we give any rules to parent that rules automatically goes to the child. Child does not conatin any seperate rules.
5)we can directly conert m-d relationship to lookup relationship
6) if we give a value to m-d relationship field that value doesnot changed.
*m-d=Master-detail
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 may be same or not.
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) if we give a value to lookup relationship field we can change that value whenever we required.
You can also refer here (http://devfacts.com/master-detail-relationships-vs-lookup-relationships/) .
http://devfacts.com/master-detail-relationships-vs-lookup-relationships/
Greetings!
Lookup and Master-detail both are types of relationships.
In lookup, both objects are not sharing properties between them means loosely coupled.
In Master-detail, both objects are sharing properties with each other means tightly coupled.
So If you want to create a rollup summary field in the parent object, so create an MD relationship otherwise create a lookup relationship.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi
It will be visible whenever you create master-child record and inside the master record.
when we create rollup summary inside the master record, we can perform 4 operations.
1. Count
2. Sum
3. Min
4. Max
RollUp Summary is act like formula field.
👍That's all about RollUp Summary.
Thank you.