External Lookup Relationship in Salesforce

External Lookup Relationship in Salesforce can be used for creating a relationship that links the object to an external object.

Suppose I work in Salesforce. While there, I must create an external lookup relationship that links the object to an external object whose data is stored outside the Salesforce org. I used the external lookup relationship field.

Let’s go into more detail about creating the external lookup relationship field type in Salesforce Lightning and Salesforce Classic.

External Lookup Relationship in Salesforce

An External lookup relationship field type is used to create a relationship linking an object to an external object whose data is stored outside Salesforce.

For example, a person orders food and gets the order ID after ordering. The restaurant manager can link the customer’s order details to the order based on the order ID. When the food is ready, they click on the order ID, and the details of the order come up. They check whether the order is for this customer or not.

So they ask her delivery agent to deliver this parcel to their customer. For all this process, the hotel manager uses the External lookup relationship.

Now, let’s move further and see how to create the external lookup relationship field type in Salesforce Lightning and Salesforce Classic.

Read How to Create Formula Field Type in Salesforce

How to Create an External Lookup Relationship in Salesforce Lightning

Here we are creating the external lookup relationship in Salesforce Lightning.

Here are the following examples:

1. Log into your Salesforce Account, Go to the Gear Icon, Select the Setup option, and click on the Object Manager tab.

How to create an external lookup relationship field type in Salesforce

2. Here, we want to select the order object. Enter the order object in the search box. Click on the Order object.

How to create an external lookup relationship field type in Salesforce Lightning

3. Here, we want to select the Fields & Relationships option. Click on the Fields & Relationships option.

Create an external lookup relationship field type in Salesforce

4. Here, we want to create a new field. So, for this, click on the New button.

Create an external lookup relationship field type in Salesforce Lightning

5. Here, we are selecting the external lookup relationship data type checkbox. Click on the next button.

Salesforce create an external lookup relationship field type

6. The order’s new custom field page is open. Now, choose the related external object. We are selecting Related To as Order Detail. After that, click on the next button.

Salesforce Lightning create an external lookup relationship field type

7. Now enter the details, fill the Field Label as Order ID, and then enter the Length as 18. After that, fill the field name by simply clicking on the field and clicking on the next button.

See also  Salesforce Inline Editing Checkbox
How to create external lookup relationship field type in Salesforce

8. Now, establish the field-level security. Select the profiles we want to grant edit access to this field via field-level security. Click on the next button.

How to create external lookup relationship field type in Salesforce Lightning

9. Now add the reference field to the page layouts that should involve this field. The field will be added as the last field and will not appear on any pages. Click on the Next button.

Create external lookup relationship field type in Salesforce

10. Add the custom field to the page layoutSelect the page layout that should include this field. This field will be added as the last field in the first two-column section of this page layout. Click on the save button.

Create external lookup relationship field type in Salesforce Lightning

11. Here, we come back to the Fields & Relationships page. The Fields & Relationships page is open, and under this page we can see the order ID is created successfully.

Salesforce create external lookup relationship field type

This way, we understand how to create the external lookup relationship type in Salesforce Lightning. Let’s Proceed and learn how to create the external lookup relationship field type in Salesforce Classic.

How to Create External Lookup Relationships in Salesforce Classic

Here, we are creating the external lookup relationship in Salesforce Classic.

Consider a scenario: We are using the Product object, inside the product object, creating the product selling detail to get the details of the selling product.

We want to get the details of the product so that this product manager can create the external lookup relationship field linked to the product object.

Here are the following steps:

1. Go to the Profile Picture, Select Switch to Salesforce Classic version, and click on the Setup option.

See also  Salesforce Case Sensitivity For Text Field Type
How to create an external lookup relationship field type in Salesforce Classic

2. Enter the Product in the Quick Find Box. Click on the product drop-down arrow. The product drop-down list is open. Under this drop-down list, we select the Fields option.

Create an external lookup relationship field type in Salesforce Classic

3.

The product custom field page is open after selecting the fields option. Scroll to the bottom of the page, and there is a product custom field and a relationship section. For creating the new field click on the new button.

Salesforce Classic create an external lookup relationship field type

4. Here, we select the external lookup relationship data type checkbox. Click on the next button.

How to create external lookup relationship field type in Salesforce Classic

5. Now, choose the related external object. Select the external object to which this object is related; now, we are selecting the Related To as Order Detail. Click on the next button.

Create external lookup relationship field type in Salesforce Classic

6. Now enter the labels and names for the lookup field. First, fill the Field Label with the Product Selling Detail, and then enter the Length as 18. After that, fill the field name by simply clicking on the field, and the field name is automatically filled. Click on the next button.

Salesforce Classic create external lookup relationship field type

7. Now, establish the field-level security. Select the profiles we want to grant edit access to this field via field-level security. Click on the next button.

How to create the external lookup relationship field type in Salesforce Classic

8. Here, we are adding the reference field to the page layout after clicking on the next button. Now, the page layouts that should involve this field will be added as the last field, and the field will not appear on any pages. Click on the next button.

Create the external lookup relationship field type in Salesforce Classic

9. Here, we are adding the custom field to the page layout. Select the page layout that should include this field. This field will be added as the last field in the first two-column section of this page layout. Click on the save button.

Salesforce Classic create the external lookup relationship field type in Salesforce Classic

10. Now, we come back to the product page and scroll to the bottom. Under the product custom and relationships section, we can see our Product selling detail field is created successfully.

How to create a external lookup relationship field type in Salesforce Classic

This is how we learned how to create the external lookup relationship in Salesforce Classic.

See also  How to Promote Existing Multi-select Picklist Field Value as Global Value Set on Salesforce

Conclusion

I think you will learn how to create an external lookup relationship in Salesforce. I have also explained step by step how to create the external lookup relationship field type in Salesforce Lightning and Salesforce Classic.

You may like to read: