+ Start a Discussion



I have below error during deployment of changeset how can I sove it, please
System.DmlException: Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, RegionF__c: bad value for restricted picklist field: city228: [RegionF__c]
Stack Trace: Class.AC008_RegionOR_Test.RegionORTest: line 15, column 1

Best Answer chosen by Sandrine
PriyaPriya (Salesforce Developers) 

Hi Sandrine,

An INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST error can occur during a data deployment if the metadata of your source org doesn’t match the metadata of your target org, or if you have invalid picklist values in your source that were added via the API.


The main way of avoiding this error is to make sure that your source and target orgs contain the same metadata with identical picklist values available in each org. You could do this manually by logging into your source org and checking what picklist values are available before logging into your target org and checking that the same values exist there too.

To fix this, you would need to Add the invalid value to the restricted picklist value set in the target Org.

Refer this article for detail :- https://docs.gearset.com/en/articles/2964854-resolving-data-deployment-errors-invalid_or_null_for_restricted_picklist#:~:text=An%20INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST%20error%20can%20occur,were%20added%20via%20the%20API.


Kindly mark it as the best answer if it works for you.


Thanks & Regards,

Priya Ranjan