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
Rama Gaikwad 1Rama Gaikwad 1 

validation rule not working for a custom object

Hello Guys,

I have created the below validation rule on a custom object certification__c.
If stage__c selected value is Done or Certification In-process and
prior value of stage__c is Rejected.

A warning message will be shown, but it is not working.

Thank you in advance.
AND(  OR( ISPICKVAL(Stage__c, "Done"), ISPICKVAL(Stage__c, "Certification In-process") ), CONTAINS(PRIORVALUE(Stage__c),"Rejected"))
Best Answer chosen by Rama Gaikwad 1
AnkaiahAnkaiah (Salesforce Developers) 
Hi Rama,

try with below rule.
AND(  OR( ISPICKVAL(Stage__c, "Done"), ISPICKVAL(Stage__c, "Certification In-process") ), ISPICKVAL(PRIORVALUE(Stage__c),"Rejected"))

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​

All Answers

AnkaiahAnkaiah (Salesforce Developers) 
Hi Rama,

try with below rule.
AND(  OR( ISPICKVAL(Stage__c, "Done"), ISPICKVAL(Stage__c, "Certification In-process") ), ISPICKVAL(PRIORVALUE(Stage__c),"Rejected"))

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
This was selected as the best answer
Rama Gaikwad 1Rama Gaikwad 1
Thank you dear,
It is working now