Salesforce Fact #83 | Prior value in validation rule

PRIORVALUE() function also takes into consideration the value while creating a record. So we need to be careful while working with validation rule.

In this example, the validation rule checks whether the prior value of account rating is 'Hot'.

Attached are the screenshots.





 

Comments

  1. To overcome this one can add, NOT(ISNEW()) along the PRIORVALUE() function, so that it doesn't fails.

    ReplyDelete

Post a Comment

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

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