How to fix ‘Bad value for restricted picklist field’ error

Users or developers may receive the following error when they attempt
to create or update a record in Salesforce:

Error: Invalid Data. 
Review all error messages below to correct your data.
‘Bad value for restricted picklist field: PicklistValue’

This error occurs when the picklist field referenced in the error message
meets each of the following conditions:

1. The referenced picklist field has a ‘Restrict picklist to the values defined in the value
set’ set to Enabled.

Solution: You need to make sure that you set the right value and it contains in value
set or you need to uncheck mentioned above checkbox.

2. The value ‘Label’ and ‘API Name’ are
different and you use the ‘Label’ in the update.

Solution: You need to make sure that you using API Name value for the picklist,
not the Label one.

3. The picklist isn’t Available for Editing or
a default value is set for the referenced picklist field

When you attempt to save a record in the Object that contains this picklist field, Salesforce attempts to populate the default value. Since the controlling value is not set and the picklist is restricted to only allow the dependent values.

Solution:

  • All record types should have the picklist selected in the Selected items section and not under available items
  • If the object includes Record Types  —  This error occurs if the record type sets the default value.
  • If the object does not include Record Types  —  This error occurs if the picklist field sets the value.

4. The referenced picklist field is a dependent picklist.

Solution: You need to make sure that the value is available for the selected Controlling field, if not you need to edit Controlling field dependency.

Advice: Keeping Picklist usages Safe by Using API Names

When you create a picklist field, an API Name that matches the Label is assigned. By default, the API Name can be changed at any time, but you can choose to protect the API Name. A picklist value is identified by either the displayed value or the API Name. Integrations and formulas reference the API Name so it continues to work even if the displayed value changes. An admin can prevent changes to the API Name to protect the references to the fields in formulas or during integrations, such as data import.

If you need help with your Salesforce org, let us know.