Lookup Filters

What is a Lookup Filter?

A lookup filter limits which records can be associated within an object relationship.

Why use Lookup Filters?

Use lookup filters to enforce data quality and increase usability within object relationships.

Example

When selecting a venue for a marketing campaign, users should only be able to select approved venues.

I configure the lookup filter on the “Venue” lookup relationship field:

1-14-2013 6-26-59 PM

Now, when marketing users select a venue that is not status “Approved”, they cannot save the campaign:

1-14-2013 6-30-22 PM

“Unapproved Vendor” was status “Pending”:

1-14-2013 6-30-42 PM

When a user searches for a venue through the lookup dialog, only records that match the required criteria are displayed:

1-14-2013 6-43-37 PM

Types of Lookup Filters

Required

Required filters (as shown above) require that data within the target record meet the specified criteria.  If criteria is not met, the record cannot be saved.

Optional

Optional filters will display a warning during search, but will not outright block the record from being saved:

1-14-2013 6-54-36 PM

1-14-2013 6-55-30 PM

20 Responses to “Lookup Filters”

  1. CarlosSiqueira May 31, 2016 at 7:48 pm #

    I noticed that on the Lookup Filter, if I make Filter Type “Optional”, they system will let type anything and in this case , it will create a new record on the Venue object.

    • JohnCoppedge June 3, 2016 at 10:48 pm #

      It will auto-fill whatever you type in to match an existing record, but it shouldn’t create a brand new record…

      • CarlosSiqueira June 3, 2016 at 11:20 pm #

        Tried to recreate it and couldn’t do it.

  2. Chuck Fernald April 11, 2016 at 5:32 am #

    Hi John,
    We use record types on Accts, Opptys, and Orders that are based on the market channel assigned to the account. Our Price Books are also classified by market channel. I have a custom Lookup field on Accounts pointing to Price Books which is used to set the default price book for each account. I’m not able to find the ability to add a lookup filter for this custom field. Though these are both standard objects on which LU Filters are available, it appears that creating a LU filter on PB from accounts is not available. Do you have any insight on that? Looks like my solution will have to be a Flow.
    Thanks,
    Chuck

    • JohnCoppedge April 13, 2016 at 9:12 pm #

      Hey Chuck,

      Price book is pretty specialized, it wouldn’t surprise me if that was correct. Sounds like you are thinking about it the right way.

      What about creating a pickling field that mirrors your price book selection? You could use process builder to translate that selection to populate the lookup (I think). Not ideal if your price books change often, but probably better from a ui standpoint than adding a flow.

      Cheers

      John

  3. civakalyan February 28, 2016 at 3:47 am #

    Hi John,

    can you please suggest a video explaining this concept of look up filter
    This looks easy to read but tricky to implement.

    Regards,
    Siva

  4. Shriya June 19, 2015 at 3:16 pm #

    Hi John

    In the example above there a small typo:
    Example

    “When selecting a venue for a marketing campaign, users should only be able to select approved vendors.”

    Do you think it should be Venue .

    BTW thank you s much for building this Knowledge base 🙂

    • JohnCoppedge June 19, 2015 at 8:31 pm #

      Thank you, updated. I need to hire an editor one of these days 🙂

      • Viday August 13, 2015 at 7:00 am #

        Hi John,
        Thank you for the resource. My lookup filter works differently. If the venue status is not approved i.e. anything other than “Approved” then it doesn’t show up in the lookup options. Which means there is no chance to see the error message.

        • JohnCoppedge August 13, 2015 at 10:05 pm #

          Set the filter to Optional instead of Required and you should be able to select additional records as well as see the validation message.

  5. Kevin Brown March 5, 2015 at 4:36 pm #

    The Operator in the first screen cap is “–None–“. Of course, “Equals” is the choice intended. ;>

  6. Dan Ervin September 4, 2014 at 6:22 pm #

    Salesforce now has the Lookup Filter Type “Mandatory” renamed to “Required.”

  7. Amir Zidane February 4, 2014 at 1:08 am #

    On the Lookup filter, should’nt the operator be “equal” so we can read it “Venue: Status” equals “Approved”? (see screenshot)

    http://5e2w0vysniohar1b-zippykid.netdna-ssl.com/wp-content/uploads/2012/11/1-14-2013-6-26-59-PM.png

  8. JohnCoppedge August 13, 2013 at 6:30 pm #

    Thank you!

  9. Trevor July 31, 2013 at 5:47 pm #

    Spelling mistake
    A lookup filter limits which records can bed associated within an object relationship
    Should be records can be associated not bed

Leave a Reply