What am I doing wrong?
AND(ISCHANGED((StageName),"Closed/Won - 100%"),
NOT(OR(
$User.Id = "00534000009IAAD",
$User.Id = "00580000003wipf",
$User.Id = "005800000074nof",
$User.Id = "00534000009a4KN")))
4 answers
Leah,
I agree with Mayank that the User IDs should not be hardcoded. At the same time also ensure that you use a CASE function to handle such scenarios wherein you have multiple values to be evaluated against a single field like this as it optimizes the formula and improves the readability !AND(
ISCHANGED(StageName),
TEXT(StageName) = "Closed/Won - 100%",
CASE($User.Id,
"00534000009IAAD",1,
"00580000003wipf",1,
"005800000074nof",1,
"00534000009a4KN",1,
0) = 0
)
If you choose to go with the Alias instead of the ID, then the formula becomes thisAND(
ISCHANGED(StageName),
TEXT(StageName) = "Closed/Won - 100%",
CASE($User.Alias,
"alias1",1,
"alias2",1,
"alias3",1,
"alias4",1,
0) = 0
)
That will do the trick !