Loading

Resolving "Bad Value for Restricted Picklist" Error When Importing Mailing or Billing Country Code in Salesforce

Publiceringsdatum: May 4, 2026
Beskrivning

When importing contact or account records into Salesforce using Data Loader or the Salesforce Import Wizard, users may encounter one of the following errors:

  • Mailing Country Code: bad value for restricted picklist field: {value}
  • Billing Country Code: bad value for restricted picklist field: {value}

Why this error occurs:
This error is triggered when State and Country/Territory Picklists are enabled in the Salesforce org. When this feature is enabled, Salesforce enforces strict validation on Country Code values during data import. If the Country Code value in your import file does not exactly match the value configured in Salesforce Setup, the import fails with this restricted picklist error.

Example scenario:
For example, if your CSV import file uses the value "US" for the Mailing Country Code field, but your Salesforce org is configured to use "USA" in the State and Country/Territory Picklist, the import will fail. The values must match exactly — including case and format — as they appear in the Salesforce Country/Territory Code column.

Lösning

To resolve the "bad value for restricted picklist field" error during import, follow these steps to identify and correct the Country Code values in your import file.
Step 1: Access State and Country/Territory Picklists in Salesforce Setup

  1. Navigate to Setup in your Salesforce org.
  2. Enter State and Country/Territory Picklists into the Quick Find box and select it.
  3. In Step 1, click Configure states and countries.

Step 2: Compare and Correct Country Code Values

  1. Compare the Country Code values in your CSV import file to those listed in the Country/Territory Code column in Salesforce.
  2. Edit your spreadsheet to match any values that do not align with the Salesforce-configured Country Codes.

Step 3: Retry the Import

  1. Once all Country Code values in your file match the Salesforce-configured values, retry the import. The import should now complete successfully.

Note: Disabling State and Country/Territory Picklists as an Alternative
If the priority is to import data regardless of Country Code validation, it may be possible to disable State and Country/Territory Picklists. Review the important considerations in the following article before disabling this feature: Enable and Disable State and Country Picklists.


Note: If the priority is to import data regardless of Country Code, it may be possible to disable State and Country/Territory Picklists. Review the Important note in the following article prior to disabling: Enable and Disable State and Country Picklists.
 

Knowledge-artikelnummer

000386448

 
Laddar
Salesforce Help | Article