function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manu@devManu@dev 

Difference between Self and Hiearchical Relationship

Hi all,


Can some one please tell me what is the difference between self and Hiearchical relationships in salesforce ? 

I guess both are same but when referring to User object they say Hierarchial Relationship and When referring to custom object they are calling it as Self relationship. But i dont know why and what is the difference ?

Thanks in advance

R - Manu
Best Answer chosen by Manu@dev
Vatsal KothariVatsal Kothari
Hi Manu,

Self-relationship:
When an object has a lookup with itself, it is a self-relationship. A self relationship creates a tree diagram of the objects. For example, the account has a lookup on himself, called Parent Account.
On the user object a special self-relationship called the hierarchical relationship helps create superior roles such as supervisor, manager on user object. The hierarchical relationship is a self-relationship of the user object.

Hierarchical relationship :
This type of relationship is a special lookup relationship available only for the user object. It allows users to use a lookup field to associate one user with another that does not directly or indirectly refer to itself. For example, you can create a custom hierarchical relationship field to store each user's direct manager.

If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal

All Answers

Vatsal KothariVatsal Kothari
Hi Manu,

Self-relationship:
When an object has a lookup with itself, it is a self-relationship. A self relationship creates a tree diagram of the objects. For example, the account has a lookup on himself, called Parent Account.
On the user object a special self-relationship called the hierarchical relationship helps create superior roles such as supervisor, manager on user object. The hierarchical relationship is a self-relationship of the user object.

Hierarchical relationship :
This type of relationship is a special lookup relationship available only for the user object. It allows users to use a lookup field to associate one user with another that does not directly or indirectly refer to itself. For example, you can create a custom hierarchical relationship field to store each user's direct manager.

If this solves your problem, kindly mark it as the best answer.

Thanks,
Vatsal
This was selected as the best answer
Gaurav NirwalGaurav Nirwal
You can download the pdf from this link it can solves your problem 

http://scholarsresearchlibrary.com/ABR-vol3-iss5/ABR-2012-3-5-2474-2478.pdf