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
Salesforce FSHCSalesforce FSHC 

Bad value for restricted picklist field

Hello community

I'm struggling with a small error which I can't seem to find an answer to. Can you help?

[{"message":"bad value for restricted picklist field: Bristol","errorCode":"INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST","fields":["RM_Region__c"]}]

There are scores of picklist values within "RM_Region__c". For some reason, "Bristol" is being rejected.

The closest I can get to a possible answer is that "Bristol" needs to be allocated somewhere for it to work?

I'd really appreciate any ideas the community have.

Many thanks and look forward to hearing from you.
Dutta SouravDutta Sourav
Go to the RM_Region__c Picklist and make the following change:
User-added image
GulshanRajGulshanRaj
Hi @Salesforce FSHC,

This is happening because the picklist you are passing is not defined under picklist values. So, if you are passing value which is not available inside picklist, then it will restrict you to continue. 

This is due to "Restrict picklist to the values defined the value set"  checkbox present under field defination.
User-added image



For example:
Intially if you have picklist having value as defined:
  • A
  • B
  • C
and also you have "Restrict picklist to the values defined the value set" is checked. Then it will not allow you to pass value of thie picklist as "D".

But if you unchecked "Restrict picklist to the values defined the value set" checkbox, then it will allow you to pass any value like "D" and keep adding this value to the picklist.

Here are screenshot:
Before uncheck "Restrict picklist to the values defined the value set"
User-added image

After unchecked "Restrict picklist to the values defined the value set"  
User-added image


I hope this will give you deep understanding.



If this helps you, mark this question as solved and choose best answer so it will help other in future to choose best solution. 

Thanks
Gulshan Raj


 
Salesforce FSHCSalesforce FSHC
Thank you. I think we're nearly there. Bristol is in the picklist, which is what is confusing. However, I don't see what you see. Any advice?

User-added image
Dutta SouravDutta Sourav
Okay. So you have used Global Picklist. Then this option will NOT be available.
When are you getting this error message? Can you please elaborate?
Salesforce FSHCSalesforce FSHC
I get it when a mailparser forwards an email to Salesforce. Salesforce rejects it. 

It shouldn't happen beacuse there are scores of entries in the picklist, including Bristol, but it only rejects Bristol.
Nicholas BorowiecNicholas Borowiec
I had this same problem and hopefully this post will save somebody some time in the future. The symptom is as described above, the picklist value giving the error is definitely in the list of values, and you only get the error for this 1 (or possibly several) values.

If you are using Record Types, go to the record type setup and in the Picklists Available For Editing, find the picklist in question. You will likely see that your "problem value" is not in the Selected Values column. In researching this issue I found that one of our developers deleted the original value and then added it back with the same value shortly after, likely a mistake. But, they forgot to update the record type.
Swapnil Patne 20Swapnil Patne 20
Hi all, just as a reference - this article explains why users get  Error 'Bad value for restricted picklist field' when creating records / when attempting to create a record, users may notice an error message:

https://help.salesforce.com/articleView?id=000250168&language=en_US&type=1 

Hope it helps.

​Swapnil 
 
William Linke 1William Linke 1
Just want to say thanks to Nicholas Borowlec for his post above!  That was exactly the problem I faced, and I didn't realize that record types can control which values can be used in a picklist!
Seetha Arulprakash 3Seetha Arulprakash 3
Thanks Nicholas Borowiec. Saved a lot of time!
Smita HodiggeriSmita Hodiggeri
Thank you @Gulshan Raj this helped me resolve my issue! 
David Roberts 4David Roberts 4
I had a similar issue using dependent fields on an opportunity stage. I needed to set my record's stage as 'closed won' or 'closed lost'  in order to use the corresponding 'reason why won' and 'reason why lost' values. I then found I couldn't 'extend' my object! This was because I'd not included StageName in my data record.
<force:recordData aura:id="frd"
     fields="Name,Amount,Account.Name,Reason_Won__c,StageName"
     recordId="{!v.recordId}"
     targetError="{!v.recordError}"
     targetRecord="{!v.record}"
     targetFields ="{!v.theOppRecord}"
     mode="EDIT" />

 
Victor LockwoodVictor Lockwood
@Nicholas Borowiec you're a lifesaver, thank you!
Leonardi KohLeonardi Koh
Much appreciated Nicholas Borowiec,

You saved me from agonizing headache after I encounted this exact bloody problem..
Matej FabianMatej Fabian
Found another root cause for the same error msg. Our dev forgot to deploy field dependency. Value that given me error was an option of a child picklist in dependency and it was not mapped to any parent picklist value.

Fixing dependency got rid of the error in the flow.
Velpula SidduVelpula Siddu
Hi 
@GulshanRaj
If it is standard object piclist field.
Then how to uncheck the "Restrict picklist to the values defined the value set" ?



Thanks regards
Jagadeesh
Anna SpasovaAnna Spasova
Hi,

I also share a very similar issue. What I did was update the name of a picklist value I used before. 

In the past, before updating the name, I've done a mass update and never had an issue. However, after updating the name, when trying to do a mass update, I get Error 'bad value for restricted picklist field' .

I am confused, as no settings have been touched, simply the Value name and API name were updated. 

I followed the instructions by Nicholas Borowiec and https://help.salesforce.com/s/articleView?id=000320321&type=1 , but these were already setup correctly. I am still clueless to what has happened, as if I try to update records using any other value from the picklist, there are still no issues.

If anyone can help, it would be much appreciated! 

Thanks!
Tauschia Copeland 14Tauschia Copeland 14
I am running into the same thing.  Record type is fine.  The dependent value is entered to make that value available and then I get this error 

Reason: bad value for restricted picklist field: Cyber Score bad value for restricted picklist field: Cyber Score For more information about this error or help with Web-to-Case

And this is the html for the web the case form.  Its weird that the error says the field is the value selected rather than the field name/Id.

[11:25 AM] Tauschia Copeland
Area:<select  id="00N1B00000BDYis" name="00N1B00000BDYis" title="Area"><option value="">--None--</option>
<option value="Unify Applet">Unify Applet</option>
<option value="Antivirus">Antivirus</option>
<option value="Cyber Score">Cyber Score</option>
<option value="Firewall">Firewall</option>
<option value="Device Encryption">Device Encryption</option>
<option value="Disk Encryption">Disk Encryption</option>
<option value="Secure WIFI">Secure WIFI</option>
<option value="OS Update">OS Update</option>
<option value="Password Policies">Password Policies</option>
<option value="Screen Lock">Screen Lock</option>
<option value="VPN">VPN</option>
<option value="Other">Other</option>
</select><br>