bad value for restricted picklist

Bad value for restricted picklist field

In Salesforce, when picklist fields are defined with a set list of selected values, the option to select ‘Restrict picklist to values defined in the value set’ checkbox is available for us to check. This checkbox is unchecked by default and one must check it to enable this feature.

What is the use of ‘Restrict picklist to values defined in the value set’ checkbox?

This checkbox is used to restrict the use of the picklist field to the values defined by the salesforce administrator or developer when a record is created or updated either manually or via automation (scripts or API calls etc).

What is better – Restricted vs unrestricted picklist Salesforce?

It is always better to restrict picklist values for better data quality and integrity. Otherwise, reporting on data will show inconsistent and rubbish values.

Errors that can occur due to picklist value restriction

The following errors may occur to users when data is being added to the picklist field that is not a part of the restricted and defined set of picklist values for a field.

  • ‘bad value for restricted picklist field: PicklistValue’

Error Causes

  1. The referenced picklist field has ‘Restrict picklist to the values defined in the value set‘ set to Enabled.
  2. The referenced picklist field is a dependent picklist.
  3. The page layout does not include both the controlling and dependent picklist fields.
  4. A default value is set for the referenced picklist field:
    • 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.
    • All record types should have the newly create picklist selected in the Selected items section and not under available items.
  5. Initiate a Mass Quick Action with Predefined Value Set
  6. Any active trigger on the object where the field is used can give the same error.
  7. This error can occur when you deploy a picklist field from sandbox and the values are not selected on the record types.
  8. This error can occur when the value ‘Label’ and ‘API Name’ are different in the values, and you use the ‘Label’ name in the update.

Note: above snippet is from this Salesforce article.

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

The simplest way to fix this error is by unchecking the ‘Restrict picklist to the values defined in the value set‘ checkbox on the picklist field itself. However, as mentioned above this may cause data integrity issues.

There are also times that the main cause can also be the default value of the picklist field that is set on the record type.

To resolve this issue, remove the default value from the Record Type or picklist field (depending on where it is set).

Remove the default value: Record Type

  1. Select the gear icon Setup.
  2. Click Object Manager.
  3. Select the object for the record type that contains the picklist.
  4. Select Record Types.
  5. Select the record type that contains the picklist.
  6. Click Edit for the picklist you wish to change.
  7. In the ‘Default’ field, select –None–.
  8. Click Save.

Remove the default value: Picklist

  1. Select the gear icon Setup
  2. Click Object Manager.
  3. Select the object that contains the picklist.
  4. Select Fields and Relationships.
  5. Select the picklist field you wish to change.
  6. Click Edit for the picklist value that is set as the Default.
  7. Deselect the ‘Default’ checkbox. Note: Make this value the default for the master picklist.
  8. Click Save.


As stated above, there is always a reason why picklist values are restricted or defaulted to a certain value, so it is best to fix the code where the exception is happening by catching and handling the error. This article is a useful guide on how to handle exceptions in Apex.