function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Janet Allen 14Janet Allen 14 

NSERT --- INSERT FAILED --- ERRORS : (INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST) bad value for restricted picklist field

I have created a workflow in process builder to map a picklist field from a custom object into a contact object. I can successfully map other picklist fields but this one gives the above error. The only thing I can think of is it might be too long, the picklist is UK counties. I'm using a global picklist so I know that both picklists are identical. The error message is below. Grateful for any ideas. I have 3 other picklist fields that failed too, one a multi-picklist, but I'll tackle those later.

RECORD CREATE: myRule_1_A1
Create one Contact record where:
Birthdate = {!myVariable_current.Date_of_Birth__c} (06 July 1996)
Charity_Referrers__c = {!myVariable_current.Charity_referrers__c} (null)
College_Referrers__c = {!myVariable_current.College_Referrers__c} (null)
County_of_origin__c = {!myVariable_current.County_of_origin__c} (Berkshire)
FirstName = {!myVariable_current.First_Name__c} (Test)
Gender__c = {!myVariable_current.Gender__c} (Female)
LastName = {!myVariable_current.Last_Name__c} (Dodd)
Local_Authority_Referrers__c = {!myVariable_current.Local_Authority_referrers__c} (null)
MobilePhone = {!myVariable_current.Mobile_Phone__c} (06610230804)
Next_of_Kin_First_name__c = {!myVariable_current.Next_of_Kin_First_Name__c} (null)
Next_of_kin_Last_name__c = {!myVariable_current.Next_of_Kin_Last_Name__c} (null)
Previous_accommodation__c = {!myVariable_current.Previous_accommodation__c} (null)
RecordTypeId = 01258000000U464
Referral_Agency__c = {!myVariable_current.Referral_Agency__c} (null)
Social_Services_Referrers__c = {!myVariable_current.Social_Services_Referrers__c} (null)
Town_of_origin__c = {!myVariable_current.Town_of_origin__c} (Slough)
npe01__HomeEmail__c = {!myVariable_current.Email_address__c} (dodd@gmail.com)
Result
Failed to create record.

Error Occurred: INSERT --- INSERT FAILED --- ERRORS : (INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST) bad value for restricted picklist field: Berkshire, 
JustAGirlyGeekJustAGirlyGeek
Does the 'Berkshire' value exist in the picklist field?
Janet Allen 14Janet Allen 14
Yes, as I mentioned above, I've used a Global picklist, so know that both are identical. I'm wondering if it's a problem that Global Picklists don't work with process builder??? Anyone else any experience on that?????
JustAGirlyGeekJustAGirlyGeek
I haven't seen/heard of any issues with global picklists and process builder. Can you post a screenshot of both picklists showing Berkshire? Unless it's a typo, the comma after Berkshire in the error is what is making me scratch my head:

"bad value for restricted picklist field: Berkshire, "
Neil JamisonNeil Jamison
I just ran into this same issue and worked through Salesforce support who finally figured out the answer in my situation. When creating these global picklists you have to go into the recordtype and edit the picklist and assign the picklist values to that record type. Thanks!
Doug Yeager 8Doug Yeager 8
and I am getting it while manipulating the Files Attachment object - Custom Object Definition ID: bad value for restricted picklist field: FeedAttachment
and of course, this is a hidden object so I do not have access to record type etc kind of info