Salesforce Opportunity Stage Validation Rule - Admin to edit everything, Users to close but not edit anymore

1.8k Views Asked by At

I don't have any experience with Validation Rules on SFDC and I am looking for a validation rule that would allow a ProfileID = System Administrator to be able to close, edit, reopen a Closed/Won Opportunity

PRIORVALUE( IsClosed ) = True,
NOT(OR(
$Profile.Id = "System Administrator"))
)

And combine it with the condition for my other ProfileID = "Normal User" who should be able to edit open Opps, close them, but to be unable to reopen or change the fields in the closed Opp.

1

There are 1 best solutions below

0
booky99 On

No, ID isn't right. Id is gonna look like 006000DJAD kind of thing. Heres what you want. It sounds like all you need is to prevent edits on closed ops. So you should only need to account for the situation you don't want, not all of them.

AND(
   IsClosed = True,
   $Profile.Name <> 'System Adminstrator'
)

This will block all edits to anyone not an admin user.