Create a Lookup Filter

Follow Along with Trail Together

Want to follow along with an instructor as you work through this step? Take a look at this video, part of the Trail Together series on Trailhead Live. 

(This clip starts at the 52:09 minute mark, in case you want to rewind and watch the beginning of the step again.)


From coffee makers and car engines to your email inbox, using filters is an easy way to keep things free of gunk. That’s also true when it comes to keeping your data clean. A lookup filter limits search results, restricting the valid values and lookup dialog results for lookup, master-detail, and hierarchical relationship fields. Use lookup filters to improve data quality by enforcing data consistency.

Set Up Restrictions with Filters

AW Computing’s customer support manager Kenya Collins tasked you with restricting users when they’re selecting a related contact for a case. Set up the case object so users are only able to choose contacts associated with the account from which the case was created.

Create a custom field with a lookup filter.

  1. From Setup, click the Object Manager tab.
  2. Click Case, then click Fields & Relationships.
  3. Click Contact Name, then click Edit.
  4. In the Lookup Filter section, click Show Filter Settings.
  5. Click the lookup icon Lookup Iconand choose Contact Name, then Account ID, then click Insert.
  6. Choose equals as the operator.
  7. In the Value/Field menu, select Field.
  8. Click the lookup icon Lookup Iconand choose Case, then Account ID, then click Insert.
    Account ID Filter Screenshot
  9. Ensure the Required radio button and the Active checkbox are selected.
  10. Click Save.

Now that you’ve set up a filter to aid in your clean data crusade, you’re ready to get down and dirty with process builder.

Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • 1 in 4 land a new job
  • 50% receive a promotion or raise
  • 80% learn new technologies that boost their resume
  • 66% say it increases productivity
Source: Trailblazer Community Impact Survey 2019