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
JJamesJJames 

INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: Not accepting default value

when running a test in my test class I am seeing this error: 

INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: Z102 [Payment__c]

but Z102 is the default value. In fact I don't even set the value it is automatically set so I know its not a typo or anything, I don't even reference the Payment__c in the test class.  How could this be? Any idea what's going on here?
Amit Chaudhary 8Amit Chaudhary 8
make sure you are passing same value in your picklist. Can you please post the screen shot of picklist value and test class so that we can help you.

Make sure Z102  should be case sencative