How to Create Lookup Relationship in Salesforce

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:

  1. Lookup Relationship:
  2. Master-Detail Relationship:
  3. Self Relationship:
  4. External Lookup Relationship:
  5. 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