Creating Look-Up Relationship Between Two Fields In Salesforce Object

Introduction

 
Look-Up relationship is one of the data types in Salesforce. This data type can create a relationship that links this object to another object. This relationship field allows users to click on a lookup icon to select a value from a pop-up list. The other object is the source of value in the list. If no data is existing in the object you can create a new value by clicking the “create” option.
 
By reading this article, you will learn about how to create a look-up relationship between two objects in Salesforce.
 
Prerequisites
  • Before starting this process, you must sign up on the Salesforce Trailhead lightning platform. Click here to sign up
Step 1
 
Login to trailhead and launch “trailhead playground” or “Developer Edition”
 
Step 2
 
Click the “Gear” icon and then click “Setup” option.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 3
 
In the setup page, click the “Object manager” at the top of the page.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 4
 
Refer to my previous article, how to create a custom object in the Salesforce lightning platform.
 
In the object manager page, scroll down and click the create our custom object name from the object list.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 5
 
In our created custom object page, click the “Fields & Relationship” option from the left side pane.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 6
 
Next, in the fields and relationship page our predefined fields are listed. Now we are creating a new Look-up relationship from the data type by clicking the “New” button.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 7
 
In the next page, many data types are listed on the page. Select the “Look-Up Relationship” data type radio button and then click the “Next” button.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 8
 
Next, we select the other object from “Related to” Drop down box. Click the dropdown box and select any one of the Salesforce objects and then click the “Next” button.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 9
 
In the details page, enter all the required fields and then click the “Next” button.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 10
 
Next, in the field level security page check if the “Visible” checkbox is checked and then click the “Next” button.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 11
 
Click the “Next” button on the “Add reference field to Page Layouts” page.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 12
 
In Add custom related this page, click the “Save” button to save our created field.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
We are automatically forwarded to fields and relationship pages, on the page we can show our created fields name.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
We have successfully created both picklist and picklist multi-select data type fields in salesforce.
 
Let’s test those created fields.
 

Test Our Created Look-Up Relationship Data Type Field

 
Step 1
 
Click the “App launcher” icon at top left corner on the page and then click the “View all” option.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 2
 
The app launcher pop-up window will be opened, search our created object name in the search box and then click the object name.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 3
 
Our object page will be opened, click the “New” button.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Step 4
 
In the pop-up window, enter all the details in the required field and scroll down to the last. Our created Look-Up Relationship field will be displayed.
 
Click the lookup icon to create new value in another object.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
Other object's pop-up will be opened, enter name and account number on a pop-up and click the “Save” button. These data are stored in another object.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 
In our Look-Up field, it gets data from another object from the current object.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object
 

Summary

 
Finally, we create a Look-Up Relationship data type field and then created a relationship between two objects successfully.
 
Creating Look-Up Realitionship Between Two Fields In Salesforce Object


Similar Articles