Skip to main content

Create a Lookup Filter

Follow Along with Trail Together

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

(This clip starts at the 47:36 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 Icon and 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 automation.

Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities