How to fix FIELD_FILTER_VALIDATION_EXCEPTION in Salesforce deployments
A lookup field value doesn't satisfy the lookup filter configured on that field.
Surfaces during: runtime DML, wherever a lookup value is set, including Apex testsWhat it means
FIELD_FILTER_VALIDATION_EXCEPTION means a lookup or master-detail relationship is being set to a value that fails the lookup filter defined on that field. Lookup filters restrict which records can be selected based on criteria like status or record type, and Salesforce enforces them on every save, not just through the UI.
Unlike a validation rule, a lookup filter is configured on the field itself in Setup rather than written as a formula, so it's easy to forget it exists until seed data or a migration script sets a value the filter was designed to reject.
Common causes
The fix
- Update migration or seed data to meet current filter criteriaPoint the lookup at a record that satisfies the destination org's active lookup filter.
- Review the lookup filter when deploying data that needs an exceptionTemporarily relax the filter if a specific bulk load genuinely needs to bypass it, then restore it afterward.
- Audit lookup filters after object model changesWhenever a filter's criteria changes, check existing automation and test data for references that would now fail it.
How Serpent prevents this
Serpent validates deployments against the target org's current metadata before promoting a task, so a lookup filter tightened in a later release surfaces during CI rather than during a production data load. See the Salesforce deployment error library.

Prevention
Related errors
FIELD_FILTER_VALIDATION_EXCEPTION, answered
Start free. No credit card, no install, no commitment.
Set up in under 15 minutes. No DevOps hire needed.
