Salesforce - Lookup Relationship


Advertisements

A Lookup relationship involves finding value of a field based on the value in another field in another object. It is mostly used in the case of commonly shared data between two objects.

Example

In the courier company, we have a delivery location which must be related to a delivery schedule. So we have a field "DeliverySchedule" in the object Delivery location that looks up for values from the other custom Object named "Delivery Schedule". Let us now see the steps to create such a lookup relation.

Step 1

First we identify the objects and the fields which need to have the relationship. In our example, these two objects are Delivery Schedule and Delivery Location.

Step 2

Create a Custom Object named DeliveryLocation as we did in the previous chapter. In it, go to the tab fields and relationships. Click New → Custom Filed → Lookup Relationship. Choose the field type as lookup field and enter the details as shown below.

Lookup 1

Step 3

You can verify the lookup relationship created by going to the schema builder and choosing the two objects for display.

Lookup Final
Advertisements