Hideout guild relationship.
So what does height of guild relationship.
We already learnt about the other relationship types.
Now let's see what does a hierarchical relationship in fact like he does a variation of the lookup relationship.
So what does that variation the regular look up relationship.
Is basically a relationship between two different objects.
So while you know we have a parent object we have a child object and then we create a relationship between
them and in our data model.
The best example for lookup relationship would be the relationship between a student and extracurricular
activities that extracurricular activities a parent and a student as a child and one extracurricular
activity can have many students enrolled in that right.
So that is the example that we understood for the regular look up a relationship and then we learned
about self relationship.
So what is the self relationship.
Who doesn't type of look of relationship again.
However youth links an object to itself basically the parent is the same object.
Logically it might work differently.
However technically the parent is also the same object.
That is why it is called is linking an object to itself and the name is given as self relationship however
in safe relationship.
Regarding orders that we can create a self relationship only for the other objects and not for the user
object.
There is a exception.
So what do you do for the user object.
So when it comes to user object that kind of a self relationship that we create is called as hierarchical
relationship so high ranking lookup relationship is special look up relationship available only for
the user object.
Using this hierarchical relationship option we can create a new look up food in that user object and
associate one user with the user.
The best example that we use in real time is storing the user's direct manager.
So in that case what we do is we create a custom hierarchical relationship field in the user object
and we store the manager's details of all the users that is called in hierarchical relationship.
Now let's quickly create this relationship in the UI.
Go to the Salesforce application look for the user object so customize use US fields and here we have
all the standard fields listed on for the user object go to custom fields hit the new button and here
we can see this option of hierarchical relationship.
So this particular option of hierarchical relationship we can see in any other standard custom objects
at the same time.
Also note that you do not have this option of lookup on master detail here.
The only relationship that we can create this hierarchical relationship so click hierarchical relationship
hit the next button fill in the details here.
Give a more meaningful description and help text if needed.
Set your field level security.
Ask for the requirements.
Perfect.
Now that we have created our custom field of the type hierarchical relationship.
Now let's go ahead and create a user clerk
manage users users.
It is done all the users that is already there.
Then you use a button in this user creation page.
We should be able to see the new field manager that we just created and this manager field is a hierarchical
relationship field that looks up through the user records.
And here we have only one other user so that is why but otherwise in real time all the other users will
be listed out here.
So this is the hierarchical relationship which is a variation on the lookup relationship and it is created
only on the user object.
Then it links to itself.