I worked as a Salesforce Administrator for an organization that was hiring employees across various departments. As part of creating profiles for these new employees, we needed a way to assign them to their respective departments easily.
To do this, we wanted a field that would allow users to search for and select the appropriate department for each employee.
So that, when users open a department record, they should see a list of all new employees assigned to that department. To meet this requirement, we used a lookup field in Salesforce that provides this functionality.
Here, I will explain the lookup relationship field in Salesforce. In this section, we will explore the types of relationships available in Salesforce and demonstrate how to create a lookup relationship using an example.
Types of Relationships in Salesforce
The following are the five types of relationships in Salesforce:
- Lookup Relationship:
- Master-Detail Relationship:
- Self Relationship:
- External Lookup Relationship:
- Many-to-Many Relationship:
Lookup Relationship in Salesforce
In Salesforce, a lookup relationship is loosely coupled. It establishes a relationship between two Salesforce objects, allowing us to access records of other objects in the relationship.
The lookup relationship is a one-to-many (parent-child) type of relationship, and the lookup field is always created on many sides (child). In a lookup relationship, the child record does not depend on the parent record; it can exist without the parent.
Create a Lookup Relationship in Salesforce
Suppose there are two objects: a Contact object and a Custom Object named Bank Account_c. You need to relate the bank account record to the contact record so that you can add the bank account to the contact from the contact object.
Using the following steps, we can achieve the above requirement by creating a lookup relationship between the bank account and the contact object. In this scenario, the Contact Object is a child object because one bank account can have many contacts, so we will create a lookup field on it.
- Go to Object Manager. -> Search the object on which you want to create a Lookup Field. -> Click on it. Here, I have selected a Contact object.

- Then click on Fields & Relationships, and to create a new field, click on the New button.

- Select Data Type as Lookup Relationship, then click on the Next button.

- Now, in the Related To field, we need to select with which object we want to establish a relationship. Here, I have selected the Bank Account object.

- Then enter Label, which will appear on the Detail Page of the contact object. The Field Name is the API Name, which will automatically populate.

- Then enter the Child Relationship Name.
- Required: If you want to lookup a field that should not be empty, then you can make it required.
- Auto add to custom report type: If you don’t check this field, it will not be added to existing reports.
Lookup Filter:
- Lookup Filter filters records based on the condition or formula you defined. You can also make the lookup field required.
- The Lookup Filter in Salesforce is used to filter required records according to our needs. After applying the lookup filter, the lookup field will display only those records according to our defined condition.

- In the Field Level Security, you can decide to which Profiles the lookup field will be visible. Then click on the Next button.

- Enter the Related List Label, which will display as a related list Parent Object(Bank Account). Then click on the Save button.

- Now, here you can see the Lookup Relationship has been successfully created.

- Now go to the Contact object, and as you click on the Bank Account lookup field, you will see bank account records, and you can select any record from the bank account object.

This is how we can create a lookup relationship in Salesforce.
Conclusion
I hope you now have an idea about the Lookup Relationship in Salesforce and how to create a Lookup Relationship field. In that, we have seen the types of relationships in Salesforce: Lookup relationship and Lookup Filter.
We have also seen the difference between lookup and master details and how to create a lookup relationship in Salesforce with examples and explanations.
You may also like:
- Delete Master-Detail Relationship in Salesforce
- Roll-Up Summary Field in Salesforce
- Create Lookup Field in a Salesforce Flow
- Create Date Field Type in Salesforce
- Create an External ID in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.