Salesforce Fact #449 | Simplified validation rule on picklist field value
Suppose we have a validation rule which restricts the account record save when the Account type is any of these values, Prospect and Other.
Now, as per the usual approach this is how we would write the validation rule:
OR(
ISPICKVAL(TYPE, 'Prospect'),
ISPICKVAL(TYPE, 'Other')
)
But do you know we can simplify the validation rule using CONTAINS() function like this:
CONTAINS('Prospect:Other', TEXT(Type))
Comments
Post a Comment