1

When trying the test class for the related picklist value in a Quote field i get the following message:

System.DmlException: Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, bad value for restricted picklist field: 3668: [Sales_Org__c]

But the value 3668 exists and it's free of errors in the org. Any idea? thanks

  • Are you using record types for Quotes? – Sander de Jong Nov 29 '16 at 14:09
2

This is a recently introduced feature which makes sure that we don't accidentally enter wrong value in pick-list which actually doesn't exist. There are only two ways you can get this error:-

  1. You are trying to enter non-existing value to that pick-list field and restricted pick-list is enabled.

  2. Object contains record types and that particular value is not available for that Record type. Restricted Pick-list feature is enabled.

  • Can you please add a link to documentation. I have started to run into this problem. – SeanW Feb 12 '17 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.