INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST in Salesforce: what it means and how to fix it

Short answer: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST means you wrote a value to a picklist that only accepts its own defined values, and the value wasn't one of them. Salesforce doesn't add it on the fly. Either the data has to be mapped to an existing active value, or an admin has to add the value to the field.

Admins can lock a picklist to its defined values. Once a picklist is restricted, every insert and update has to use one of its active values, matched against the value's API name. Anything else is refused, and the failing value is quoted back:

INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST: bad value for restricted picklist field: Warm Lead

Some tools word it slightly differently, for example "restricted pick list field", but the meaning is the same: the value after the colon isn't on the list.

Why it happens

  • Values from another system. A source CRM or spreadsheet uses its own vocabulary, such as "Prospect" where the Salesforce field expects "Prospecting", or free text where Salesforce has a fixed list.
  • Labels instead of API names. The data carries what users see in the dropdown, while the API matches on the value's API name.
  • Inactive values. Old records still hold values an admin has since deactivated, and loading them back in fails.
  • Orgs with different value sets. A sandbox or another production org lacks values that were added to the source org later.
  • Formatting differences. Extra spaces, different punctuation, or multi-select values separated by commas instead of semicolons.
  • Address codes. Country and state code fields under State and Country Picklists are restricted, so names, unknown codes and inactive countries fail.

How to fix it

  1. Pull the field's valid values. Describe the object, or open the field in Object Manager, and export the active values with their API names.
  2. Build a value map. Translate every distinct source value to a target value, and decide what to do with values that have no equivalent.
  3. Clean formatting by trimming whitespace and normalizing multi-select separators to semicolons.
  4. Add missing values when they are legitimate. If the business really uses the value, add it to the picklist or its global value set.
  5. Keep orgs in step. Before loading into a sandbox, compare its value sets with the source org's.
  6. Remove the restriction only as a last resort, since it's usually there to keep reporting clean.

How Syntharil handles it

Syntharil classifies INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST as a schema or configuration error. When seeding, it reads each picklist's active values from the org's describe and picks from that list, and values from the persona-based generator are checked against the same list afterwards. Its automatic field profiles, including AI-generated text, are never applied to restricted picklists. If the org reports a restricted picklist with no active values, Syntharil logs a warning in the worker log, because those rows can't succeed. A fixed value you set yourself in the field configuration is used as written, so Salesforce rejects it if it isn't on the list. During replication, picklist values are copied as they are in the source, so a value the target's restricted picklist doesn't include is rejected for that row and reported with Salesforce's message. Add the value to the target field before the next run.

FAQ

What makes a Salesforce picklist restricted?

A picklist is restricted when its definition limits it to the values in its value set. Unrestricted picklists accept unknown values through the API and store them as-is, while restricted ones reject them with INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST. The field's describe reports this as restrictedPicklist.

Should I send the picklist label or the API name to a restricted picklist?

Send the value's API name. Each picklist value has a label shown to users and an API name used by integrations, and the two can differ, for example after a value was relabeled. A label that doesn't match any API name is rejected.

Do inactive picklist values cause INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST?

Yes. Deactivating a value keeps it on existing records but stops new writes from using it. Historical data that still carries an inactive value fails when it's loaded into a restricted field.

How does INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST apply to multi-select picklists?

Multi-select values are sent as one string separated by semicolons, and every item must be a valid value. One unknown item, or a different separator such as a comma, fails the whole field.

Why does BillingCountryCode return INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST?

With State and Country Picklists enabled, the country and state code fields are restricted picklists fed by the org's configured countries and states. A code that isn't active in that org, or a country name sent where a code is expected, is rejected.

All Salesforce errors →

Try Syntharil free