Now that we have a good understanding of a master detail relationship how to create them how to use
them.
Now let's see what all the various concentrations while using master detailed relationship
first one master detailed relationship feel is required on the page layout of the detail object.
Yes we pretty much know that you know in a detail object venomous we create a master detail relationship
feel that feel automatically becomes required on the lay up because it is basically a tied bonding between
the master and the detail object right.
So it does required makes sense repatriating option available.
Yes rebalancing option is not available by default but then you have the option to select it and make
it available.
So what does repatriating the child in a car can be regroup with a different parent record.
So that is the concept of healthy parenting.
In our example
in an instructor class instructor is related to department right instructor as a child and department
does the painting and this particular instructor right guard is already associated to the Department
report that does the informatics and now when I tried to edit does it a class you'll see that a department
is not a double meaning repatriating option was not selected.
So it does not by default.
However that is an option to check that field to allow re parenting while creating lots of detailed
relationship.
We can edit at any point of time so once that option is checked this becomes this field becomes a double
meaning you can regroup.
This particular child I got a lot different than a card that gives this field becomes required on that
page Leo to.
So this is the option about re parenting next consideration is that all up somebody feels can be created.
Yes Master detailed relationships support a role up somebody feels.
So what does it all up somebody feel lonely up somebody feel is basically a feel type that is created
on the parent object which helps in summarizing the values of its related child records so then no parent
object has got a child object related to it to master detailed relationship then automatically roll
up somebody feels can be created on the parent object.
In other scenario the parent object is department and it has got many instructors to it that is child
object as instructors.
So now if we tried to create a field in the department object you can't see the role of somebody field
type.
This is enabled so this field type role somebody will be enabled only for objects if it access apparent
object not master detailed relationship for other objects it wouldn't be enabled say for example extracurriculars
if I tried to create a field in extracurriculars object they do not see this option enabled.
Why.
Because it does not and lost an object for any mustard eating relationship moving on Master objects
can be standard or custom detail objects can only be custom objects yes so Master objects can be standard
objects or custom objects however not the exception here not all standard objects other than user and
lead so other than user and LEED any standard object can be a master object and there are no restrictions
as such in custom objects and when considering detailed objects it can only be custom objects standard
objects cannot act as a detail objects from custody to a relationship
moving on or no field is not available on the detailed records.
Yeah makes sense because it basically inherits all its shading and security settings from the pattern
card right.
So they do not have on a field because it is populated from the A.
So again again another scenario the child car does instruct us.
So if I go to the instructor a car I do not see ask any owner field in the child's record because it
is automatically inherited from the parent record and he had in another scenario the parent regard as
a department and he does go to the owner.
Yeah because it is a master record.
However the detailed records do not have the on the field populated in that
next multi-level master detailed relationships as possibly yes.
So when we say there is a master object and it is related to a detail object that forms one level of
relationship.
Similarly it can go up to three levels of multilevel master detail relationships
and they should also note that does my idea of animosity master relationships can also be used in reports
moving on detail objects cannot have sharing rules manual sharing argues yes in master detail relationship.
It is basically a tight bonding between the master object and the detail object.
The detail object basically inherits all the sharing and security settings from the master object so
you cannot have separate file sharing rules of its own.
Let's quickly check it out in the UI
go for sharing settings in our scenario department is the parent object and instruct us as the child
object right.
So that's the reason we are not able to see any sharing rules specifically for instruct us.
However we see sharing rules for departments extracurricular activities for courses for the other custom
objects that we created.
However we do not see instructor here because instructor is a detail object and it cannot have sharing
rules of its own.
So basically the detail object inherits all the sharing and security settings from its parent.
In fact event anything a master detailed relationship gets created automatically the order beauty setting
off the detail object gets changed to control by parent.
So in our case the detail object is to instruct us so let's quickly share the order beauty setting off
instructors and instructors control by painting.
We did not update that that system automatically update once it becomes a detail object of any master
detailed relationship so controlled by pattern in the scenario of the pattern.
Does the department object.
So on the sharing on the security side things off the detail in car.
It is inherited from the Phantom I perfect.
Moving on Master object can be deleted however detail objects can yes.
We cannot delete a custom object that access a master in a master detailed relationship.
However we can delete the detail object but in that scenario when we delete a detail object what happens
is the master detailed relationship automatically gets converted to look up a relationship.
And how about deleting records deleting the master the card also deletes the later detail and some detailed
record.
We are well aware of this so this is the concept of Cascade deletion.
Then it was apparent a card gets deleted automatically all its related child records also get deleted.
So when we say some detailed records it means the next level of the hierarchy that is master detail
then that detail acts as a monster so in that case like we say does a sub detail record.
So event about a master the card gets deleted all its related detail and sub detail records also gets
deleted.
At the same time if I'm the leader must a car then it and delete the related detail in some detail regards
us.
And the last one is about report.
So whenever I'm lost I detailed relationship is created between two objects automatically standard report
type also gets created.
This is pretty similar to that lookup relationship whenever we create a monster detailed relationship.
Then automatically a standard report gets created.
Here we are in the report step and when we tried to create a report and attach a report type to that
I see a department would instruct us this report type was available because that is a master detailed
relationship between the reports that Saudi departments and instruct us so these are the various considerations
that we need to have in mind while creating and using master detailed relationship.