Define Lookup Filters
Create and define lookup filters. Lookup filter criteria can compare fields of different types as long as they are compatible. Value-based filters are supported in Lightning Experience and Salesforce Classic.
Required Editions
Important Where possible, we changed noninclusive terms to align with our company
value of Equality. We maintained certain terms to avoid any effect on customer
implementations.
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: All Editions except for Database.com. |
| User Permissions Needed | |
|---|---|
| To define lookup filters: | Customize Application |
- From the management settings for the field’s object, go to Fields.
- Click Edit next to the name of the lookup or master-detail relationship field to which you want to apply the filter.
- In the Lookup Filter Options section, click Show Filter Settings.
-
Specify the filter criteria a record must meet to be a valid value. To specify criteria, click
Insert Suggested Criteria and choose from a list of suggested criteria,
or manually enter your own criteria.
- In the first column, click the lookup icon or start typing in the text box and select a field.
- In the second column, select an operator.
- In the third column, select Value if Salesforce should compare the field in the first column with a static value, or select Field if Salesforce should compare the field in the first column with the value of another field.
- In the fourth column, enter the value or select the field that Salesforce should compare with the field in the first column.
- Click Add Filter Logic to add Boolean conditions.
- Select a suggested field from the Field text box. You can only select fields on the current record, the lookup object, or the user record. You can also choose related fields that are one relationship away from the lookup object. Salesforce assists you by listing the available fields and relationships when you click the lookup icon or click inside the text box.
-
Specify whether the filter is required or optional. For fields with optional lookup filters
(Salesforce Classic only), values that match the lookup filter criteria appear in the lookup
dialog. To remove the filter and view all search results for the lookup field, users can select
Show all results in the lookup dialog. Also, optional lookup filters
let users save values that don't match the lookup filter criteria without Salesforce displaying
any error message. In Lightning Experience, all filters are required, even if admins specify
them as optional in Setup. There’s no Show all results view.
For required lookup filters, specify whether you want Salesforce to display the standard error message or a custom message when a user enters an invalid value.
- Optionally, enter text to display in the lookup search dialog. Consider text that guides users in their searches and explains the business rule that the lookup filter implements.
- Leave Enable this filter selected.
- Save your changes.
Did this article solve your issue?
Let us know so we can improve!

