Activity Forums Salesforce® Discussions What is a Self-Relationship in Salesforce?

  • Archit

    Member
    March 27, 2018 at 12:25 pm

    Hello Rahul,

    A Self-Relationship is a lookup relationship to the same object.

    For example :  we have a field on Account which is Parent Account that allows us to choose any account for being a parent account of an existing one.

    Thanks!

  • PRANAV

    Member
    March 27, 2018 at 12:32 pm

    Hi Rahul,

    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.

    Hope this helps you.

  • shariq

    Member
    September 16, 2018 at 6:00 pm

    Hi,

    Self relationship :
    By the name mean relation with oneself, means creating lookup of sobject within same sobject.
    Lot of business scenarios required this type of relationship.

    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.

    Hope this helps.

  • Parul

    Member
    September 17, 2018 at 3:46 am

    Self Relationships:
    You can create a relationship from an object to itself, but it must be a lookup relationship, and a single record can't be linked to itself. However, a record can indirectly relate to itself.

    Thanks,

Log In to reply.

Popular Salesforce Blogs