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
sfadm sfadmsfadm sfadm 

Validation rule get all picklist values

How can I get all picklist values in a validation rule?

I'm looking for a suitable function but I cannot find any.

What I need to achieve is that some string is among the picklist values.

Please advise.
Best Answer chosen by sfadm sfadm
NagendraNagendra (Salesforce Developers) 
Hi,

There is no such function to get all picklist values. You can enable the "Strictly Enforce Picklist Values" https://releasenotes.docs.salesforce.com/en-us/spring16/release-notes/rn_forcecom_general_restricted_picklists_beta.htm function for a picklist, or use Apex code, but Validation Rules won't get you where you want to go.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra