I have a task to prevent users from changing the Opportunity Stage manually, except for a subset of users which do not share the same profile. I created a custom permission and a new permission set for the users that will be allowed to change it manually. Then I created this validation rule:

ISCHANGED(StageName) && NOT($Permission.Edit_Opportunity_Stage)

The problem is this also restricts updates from automated processes like flows and triggers. Is there a way to achieve this? Thanks!

  • Does this answer your question? How to prevent manually changes of Status field for Cases and Opportunities?
    – identigral
    Jul 25, 2023 at 20:38
  • So many ways you could tackle this, but a simple one would be to include the profile as part of your criteria.
    – Rodrigo
    Jul 25, 2023 at 20:51
  • @identigral Thanks. I had seen than earlier but it hadn't worked. Looking at it back now I realised that it was because the Name field by itself is looking at the Opportunity name. In order for it to work I had to do it like this because I couldn't directly access the Name field of the user on the fomula editor: ISCHANGED(StageName) && NOT($Permission.Edit_Opportunity_Stage) && NOT($User.FirstName = "Automated" && $User.LastName = "Process") Jul 25, 2023 at 23:20
  • Although Rodrigo's solution would work normally, in my case the users that should have access to edit are spread out accross several profiles, so there are users within those profiles that should not be allowe to edit. Jul 25, 2023 at 23:21

1 Answer 1


This worked. Edit_Opportunity_Stage is the custom permission for users that should be allowed to edit the Stage manually:

ISCHANGED(StageName) && NOT($Permission.Edit_Opportunity_Stage) && NOT($User.FirstName = "Automated" && $User.LastName = "Process") 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .