Loading

Lookup Field Filter on Master-Detail Relationship Does Not Work During Record Creation

Publiceringsdatum: Jun 15, 2026
Beskrivning

Overview

When a filter is implemented on a lookup field, users may find that they are unable to locate related records via the lookup dialog search when they create a new record, despite records existing and matching the filter criteria. The same lookup search returns the expected records when editing an already-saved record.

Example Scenario

  1. Create a custom lookup field on the Case object to Opportunity.
  2. Create a custom lookup field on the Quote object to Case and add a filter with the following criteria: Quote: Opportunity ID equals Field Case: Opportunity: Opportunity ID.
  3. Create an Opportunity record and then several Case records associated with the Opportunity.
  4. Open the Opportunity created in Step 3, and create a new Quote record via the Quotes related list.
  5. In the Case lookup field, try to search for the cases you created in Step 3.

When creating the Quote record, users are unable to locate the Case records via the filtered lookup. However, if the user clicks "Show all results" to remove the filter, the expected results are returned. Alternatively, if the user inputs a matching case number into the lookup field on the Quote edit page (without searching), the record saves successfully and the lookup filter works correctly when editing the existing record.

Lösning

Root Cause

If a lookup filter's criteria use a Master-Detail (M-D) relationship field, the lookup filter does not work during record creation. This behavior is by design and is a known limitation of lookup field filters.

Only fields with a Data Type of Lookup (not Master-Detail) can be used to establish lookup filter criteria that correctly reference related object records during record creation.

In the example above, the Quote object is in a Master-Detail relationship with Opportunity. Because of this, the lookup filter does not have the ability to span the Quote-to-Opportunity relationship at the time of record creation. If the Quote-to-Opportunity relationship field were of type Lookup instead of Master-Detail, the filter logic would correctly span the relationship path.

Workaround

Consider one of the following workarounds:

  • Remove the lookup filter from the field.
  • Populate the lookup field after the record has been created and saved (the filter works correctly during record edit).
Knowledge-artikelnummer

000383698

 
Laddar
Salesforce Help | Article