0

Trying to create a validation rule to stop a particular Roles (example Role A, Role B and Role C) from changing info on a closed opportunity.

I have 1 user which I want to bypass this validation rule but has the Role C - how do I go about creating this part of the rule?

I have tried by using the username as the data point:

AND(PRIORVALUE(IsClosed) = True,
&& (OR($UserRole.Name = "Role A",
$UserRole.Name = "Role B",
$UserRole.Name = "Role C" AND $User.Username <> "[email protected]"))

Any help will be much appreciated

1 Answer 1

0

try to change this

 AND $User.Username <> "[email protected]"

to this

 AND NOT($User.Username = '[email protected]')
6
  • Thanks for helping :) Unfortunately it hasn't solved the issue. Not sure how to do this as '[email protected]' has the role 'Role C'. I want all Role C users to be faced with the validation except for [email protected] Commented Feb 3, 2023 at 15:11
  • Maybe the username is misspelled? Commented Feb 3, 2023 at 15:33
  • I have just double checked and it is still stopping that user from making the changes. I wonder if it's just picking up that she is is part of Role C? Commented Feb 3, 2023 at 17:20
  • maybe. because I tested the condition I sent and it works fine. try to remove all your conditions and add them 1 by 1 to make sure all is correct and it comes to username evaluation Commented Feb 3, 2023 at 17:25
  • 1
    amazing! it worked as you said so thank you! (it was my error for forgetting my next steps with configurations) Commented Feb 3, 2023 at 19:47

You must log in to answer this question.

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