How to fix INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST in Salesforce deployments
A record is being saved with a picklist value, or no value, that isn't in the field's restricted value set in the target org.
Surfaces during: runtime DML, in data loads, integrations, and Apex test setupWhat it means
INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST fires when a picklist field is set to restrict values to those defined, and a record tries to save a value outside that list, or a required restricted picklist is left blank. The value might be perfectly valid in the source org; the problem is the target org's value set doesn't match.
Restricting a picklist is opt-in per field; an unrestricted picklist silently accepts any string, including ones with typos, while a restricted one enforces the defined value set strictly, which is exactly why this error tends to appear the moment a field's restriction is turned on for the first time.
Common causes
The fix
- Deploy the picklist value set with the fieldInclude the full active value list, and any record type value mappings, in the same deployment as the field or record type change.
- Add the missing value to the target org's picklistIf the value should be valid there too, add it to the picklist's value set before retrying the deploy.
- Map or clean the data before loadUpdate the incoming data to use an active, mapped value instead of one the target org's picklist no longer accepts.
How Serpent prevents this
Serpent syncs picklist value sets and record type mappings alongside the sandboxes it manages, so a restricted picklist stays aligned across every org instead of drifting silently. See the Salesforce deployment error library.

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