How to Create Lookup Filter in Salesforce

In the Salesforce tutorial, I will explain how to create a lookup filter in Salesforce lightning and Salesforce classic.

A lookup filter is used for filtering the records if the user can lookup the single or we can say that the one side of the records with the help of the lookup search icons on the many sides of the records.

To create a lookup filter in salesforce, I found a solution that helped us. So in this tutorial, we will understand how to create a lookup filter in Salesforce.

  • What is a lookup filer in Salesforce?
  • How to create a lookup filter in Salesforce
  • How to create a lookup filter in Salesforce lightning
  • How to create a lookup filter in Salesforce Classic

What is a lookup filer in Salesforce?

In Salesforce lookup filter is a field that permits the user to connect the two records in a relationship together.

Let’s take an example there are two objects object A and object B. Object A is on the one side and the object B is on the many sides wherever we create a record of B we need to relate it to the object of the A’s record using that lookup search icon that is available on the Salesforce lightning a classic version.

Let’s take another example there is a user who wants to link a contact record to an account record and they are linking these two. They are linking these two records by using the account name lookup field. When the user checks the lookup fields then they get the right records.

So, with this, we have learned about What is lookup filter in Salesforce. Further, we will learn about how to create a lookup filter in Salesforce.

How to create a lookup filter in Salesforce

In Salesforce the motive of the lookup filter is to control the values that appear in the lookup field. The lookup filter can improve the data quality and the option that are available is limiting in the lookup field to only those user that can link up the particular requirement.

Some of the main uses of the Lookup filter are:

  • Before the lookup value can be selected, we ensure that the particular record type and field value must be present.
  • Stop the building of duplicate records by limiting the values which can be chosen in the lookup field.
  • Restricting the option of a lookup field to only connected records.

The administrators implement the data quality, making it similar to the user for searching and selecting the accurate values in the lookup field by using the lookup filters.

This is how we have understood how to create a lookup filter in Salesforce. Now, let’s move ahead and see how to create a lookup filter in Salesforce. We will explore both the salesforce experiences: Salesforce lightning and Salesforce Classic.

Read: How to Create Roll-Up Summary Field in Salesforce

How to create a lookup filter in Salesforce lightning

Here we are creating a lookup filter in Salesforce lightning. If you want to learn how to create a lookup filter in salesforce lightning follow these steps:

Step-1: First, login into the Salesforce lightning account. Go to the gear icon that is present beside the bell icon. Click on the gear icon under the gear icon and click on the setup option.

After clicking on the setup option the setup page is open. Click on the object manager option that is present beside the home option.

How to create a lookup filter in Salesforce
How to create a lookup filter in Salesforce

Step-2: After clicking on the object manager page is open inside this page lots of objects are present. Enter the USA student object in the search box and select the object.

How to create a lookup filter in salesforce lightning
How to create a lookup filter in salesforce lightning

Step-3: After clicking on the object select the fields and relationships of the USA Student object that are present in the left sidebar.

Create a lookup filter in salesforce
Click on the field and relationships

Step-4: After clicking on the field and relationships select the contact field which has the lookup data type.

Create a lookup filter in salesforce lightning
Select the contact field

Step-5: After clicking on the contact field, the contact field page opens then click on the edit option.

Salesforce create a lookup filter
Click on the edit

Step-6: After clicking on the edit option, scroll to the bottom of the page there is a lookup filter option. Click on the show the filter setting.

Salesforce lightning create a lookup filter
Click on the show filter setting

Step-7: After clicking on the show filter setting option the settings will be open now fill the filter criteria here we find the field as USA Student: Last Activity Date and selects the operator after that click on the filter type. There are two filter types required and optional.

Here we are selecting the required option. The required option is used where the user can enter the value that must match the criteria. If it does not display this error message on save.

The optional field type is used where the user can remove the filter or enter the values that don’t match the criteria and after that click on the checkbox of enable this filter and click on the save option.

Salesforce create a lookup filter in salesforce
Click on the save option

Step-8: After clicking on the save option, we can see that the lookup filter is created with the required field type.

Salesforce lightning create a lookup filter in salesforce
Lookup filter

So, with this, we will learn how to create a lookup filter in salesforce lightning.

How to create a lookup filter in Salesforce Classic

Here we are creating a lookup filter in Salesforce classic. If you want to learn how to create a lookup filter in salesforce classic follow these steps:

Step-1: Click on the setup, and enter the opportunity in the search box the opportunity object is visible select the fields option that is present under the opportunity object.

How to create a lookup filter in salesforce classic
How to create a lookup filter in salesforce classic

Step-2: After selecting the fields option, the opportunity standard fields page is open, and select the account name field which has the lookup data type.

Create a lookup filter in salesforce classic
Click on the account name

Step-3: After clicking on the edit option, scroll to the bottom of the page there is a lookup filter option. Click on the show the filter setting.

Salesforce classic create a lookup filter
Click on the show filter setting

Step-4: After clicking on the show filter setting option the settings will be open now fill the filter criteria here we find the field and select the operator after that click on the filter type. There are two filter types required and optional.

Here we are selecting the required option. The required option is used where the user can enter the value that must match the criteria. If it does not display this error message on save.

The optional field type is used where the user can remove the filter or enter the values that don’t match the criteria and after that click on the checkbox of enable this filter and click on the save option.

Salesforce classic create a lookup filter in salesforce
Click on the save option

Step-5: After clicking on the save option, we can see that the lookup filter is created with the required field type.

Salesforce classic create lookup filter in salesforce
A lookup filter is created

In this way, we have learned how to create a lookup filter in salesforce classic.

You may also like to read the following Salesforce tutorials.

Conclusion

In this tutorial, we have learned about a lookup filter in salesforce. We have also discussed the use of a lookup filter in salesforce. In addition, we have covered how to create a lookup filter for salesforce lightning as well as salesforce classic.

  • What is a lookup filer in Salesforce?
  • How to create a lookup filter in Salesforce
  • How to create a lookup filter in Salesforce lightning
  • How to create a lookup filter in Salesforce Classic