Salesforce Fact #767 | INCLUDES() and PICKLISTCOUNT() combo

Suppose we have a scenario where we need to check for a specific value of a multi-select picklist field in the validation rule.

Now, since multi-select picklist can be checked with INCLUDES() only, it checks as per the contains logic, not for the specific value. We can make use of the PICKLISTCOUNT() function to ensure it checks only for that specific value.

In this example, we have a multi-select picklist field in Account which has 3 values: A,B,C. Now, we want to create a validation rule so that when the account rating is 'Hot', the selected value should be 'A'.

Attached is the screenshot.






Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow