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
ShannonFlynnNYShannonFlynnNY 

Lock Value in Stage Field

As part of my organization's sales (contract) process, I would like to be able to lock in a value in the Stage field. For example, the Opportunity Owner cannot update the Stage field passed the Contract/Negotiation value. Is it possible to prevent the owner of a record from moving the value of the "Stage" field passed an actual stage?
 
Thanks
JakesterJakester
Hi Shannon,

I'm sure you can prevent certain users from editing an opportunity when it reaches a certain stage - we do that all the time in our organization. However, we haven't done any rules that say only the owner can't change it. We usually say only people in certain profiles *can* change it. I came up with something that might work, but it's untested. Let us know if it works or not, and we can go from there:

Code:
and(
         ispickval(StageName,"Contract/Negotation")
       , OwnerId =  $UserRole.LastModifiedById 
)

 

ShannonFlynnNYShannonFlynnNY
Hi Jakester,
 
I appreciate your help with this one. Is this an s-control that I am creating? Also, do I need to specify the user's names?
 
Thanks
 
Shannomn
JakesterJakester
Hi Shannon,
 
It's a validation rule - sorry I didn't mention that. So, the steps are:
 
  1. Click Setup
  2. Expand Opportunities in the gray bar on the left
  3. Click Validation Rules
  4. Click New
  5. Enter a rule name
  6. Paste the code I gave you before into the Error Condition Formula area
  7. Click Save
  8. Go try it out by having the opportunity owner try to change an opportunity that has the appropriate Stage

-Jake

ShannonFlynnNYShannonFlynnNY
It works. :-) Thanks so much.
JakesterJakester

Cool! You're very welcome.

One thing you should test: have a user other than the owner make a change to the opportunity, then see if the opportunity owner can change the opportunity.

Eric Hansen 20Eric Hansen 20
@Jakester - can you tell me how you'd do this if you only wanted admin's to be able to change the stages, not regular users?