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
EC UnitedEC United 

Restrict Opportunity Owners from Changing Opp Stage to Closed Won/ Close Lost

I recently created a validation rule preventing all users not designated as "System Admin" from changing the stage of an opportunity to closed won or closed lost.  However, I see that the opportunity owner can still make changed regardless of this VR.  Is there anyway I can restric the record owner from making these changes so that the System Admins have exclusive access.  I have professional edition by the way.

And here is my VR 

AND( 
$UserRole.Name <> "System Admin", 
ISCHANGED(StageName), 
ISPICKVAL(StageName,"1 - Closed Won"), 
ISPICKVAL(StageName,"0 - Closed Lost"))
Best Answer chosen by EC United
MellowRenMellowRen
Hi

You need an “OR”. Currently you are blocking non System Admins from changing an Opp’s Stage to both Closed Won and Closed Lost simultaneously. Since this can’t ever happen the Validation Rule never fires.

Try this:
AND( 
$UserRole.Name <> "System Admin", 
ISCHANGED(StageName), 
OR (ISPICKVAL(StageName,"1 - Closed Won"), 
    ISPICKVAL(StageName,"0 - Closed Lost")
))

Hope this helps.
 

All Answers

MellowRenMellowRen
Hi

You need an “OR”. Currently you are blocking non System Admins from changing an Opp’s Stage to both Closed Won and Closed Lost simultaneously. Since this can’t ever happen the Validation Rule never fires.

Try this:
AND( 
$UserRole.Name <> "System Admin", 
ISCHANGED(StageName), 
OR (ISPICKVAL(StageName,"1 - Closed Won"), 
    ISPICKVAL(StageName,"0 - Closed Lost")
))

Hope this helps.
 
This was selected as the best answer
EC UnitedEC United
It looks like it works now, thank you so much! 
Stevie Caterina 9Stevie Caterina 9
Does the Role a have to System Admin or the Profile for this to work? I am looking to do something similiar but we don't have a system admin role only System Administrator profile. 
 Do I swap out Sytem Admin for the role I want to be able to change the stage back?
Chad Bock 6Chad Bock 6
Hi Steve, to answer your question...yes. It could be that the user above created a custom profile and named it System Admin but if your org used the standard System Administrator profile you would just swap out the profile name. I hope this helps!