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

Validation for Opportunity Stage by Role

We are using Professional edition and we now a widget that creates an invoice in Quickbooks once an opportunity is marked Closed/Won.  We would like to make a validation rule so that only certain roles can save the record as Closed/Won.  The role that would be able to save a record is "Admin Manager"

I'm not a programmer at all but I can copy and paste and follow directions real good.

Thanks for your help,


Best Answer chosen by Admin (Salesforce Developers) 

Validation rules have to return "True" when the record does not comply with your business rules. So this should do it:

AND(ISPICKVAL(StageName,"Closed/Won"), $UserRole.Name  <> "Admin Manager")