Salesforce Fact #508 | Ends with in validation rule
We have BEGINS() function in validation rule to check whether a String starts with a particular text. But there is no function to check whether a String ends with a particular text. We can implement the same using a bit of tweak in the logic.
Suppose, we have a use case where the Account description does not end with the word 'Test'. We can use the RIGHT() function to implement this logic. Also to make the text configurable, we can use custom labels and also in order to check case insensitivity we can use UPPER/LOWER functions.
Attached are the screenshots.
Comments
Post a Comment