Apr 29, 2019 | 0 Comment | Posted by Shrey Sharma

Lookup Relationship

This type of relationship links two objects together, but has no effect on deletion or security.

 

Unlike master-detail fields, lookup fields are not automatically required.

 

When a lookup relationship is defined, data from one object can appear as a custom related list on page layouts for the other object.

There are derived into 2 sub types:

~Hierarchal: A special lookup relationship available for only the user object. It lets users 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.

~Self: When an object has a lookup with itself, it is a self-relationship.

 

Many-to-many: Many-to-Many relationships can be modelled using master-details relationship between any two objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. To create a many-to-many relationship, simply create a custom junction object with two master-detail relationship fields, each linking to the objects need to relate.

~Primary Relationship: It is the relation created first with any of the two master object.

o The object with which the relationship is created first is called the primary master object.
o The detail and edit page of junction object will use the color and any associated icon of the primary master object.
o The junction object records will inherit the value of the owner field.
o The sharing and security settings of junction object will depend on associated master record.
o Deleting a record of primary object will delete the associated records of junction object as well.

 

~Secondary Relationship: The second master detail relationship created with another master object.

o The object with which the relationship is created first is called the secondary master object.
o This relationship does not affect the look and feel of the junction object.
o The security and sharing setting of the junction object depends on secondary relationship as well.

o Deleting a record of secondary object also deletes the associated records of junction object.

Note: Junction object cannot be created a master object in a master detail relationship with
another object as detail.

Let us now learn Lookup Filter and Schema Builder.

Share This Post

Leave a Comment

Your email address will not be published. Required fields are marked *