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
Shubham Joge 9Shubham Joge 9 

Validation rule On case object

Hello Guys ,

Can anyone help me with the vlidation rule on case object .
my condition is :
if the Status =Pending and after it get update to another staus but user cannot update it back to status = pending .
 tecnicall once we updated status from pending it cannot updted back to pending .
ShirishaShirisha (Salesforce Developers) 
Hi Shubham,

Greetings!

I don't think it is possible to create the Validation rule on Case Object directly to achieve your requirement.Also,you will need to query on the CaseHistory Object to check the old and New values of every record where Field=status.

So,you might need to write the trigger or clone the Case detailed page with the VF page to achieve your requirement.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
VinayVinay (Salesforce Developers) 
Hi Shubham,

Try below.
OR(
ISPICKVAL(Status, "Pending"),
ISPICKVAL(PRIORVALUE(Status) , "Pending"))

Thanks,
Vinay Kumar