You need to sign in to do that
Don't have an account?

Help with account owner validation rule
Hello,
I'm trying to make it so that the Accounts with a type of Customer can only be owned by someone in the Sales profile. I don't see a way to restrict by profile, so the closest I've come is to call out user ids, with the following validation rule:
and(case(OwnerId, "005500000011YxTAAU",false, "005500000011YxbAAE",false, "005500000011YB4AAM",false, "005500000011YxRAAU",false, "005500000011YxhAAE",false, "005500000012etTAAQ",false, "005500000011YAkAAM",false, true) , ispickval(Type,"Customer") )
This fails with "Error: Incorrect argument type for function case()." Help - what am I doing wrong?
Here is what I think will work. No syntax errors, but untested.
OwnerId<>"005500000011YxTAAU" && OwnerId<>"005500000011YxbAAE" && OwnerId<>"005500000011YB4AAM" && OwnerId<>"005500000011YxRAAU" && OwnerId<>"005500000011YxhAAE" && OwnerId<>"005500000012etTAAQ" && OwnerId<>"005500000011YAkAAM" && ispickval(Type,"Customer")
All Answers
What about using the User's Profile.Name?
I wrote this to give certain user Profiles and Opportunity Types an exemption from a requirement that New Opportunities must start below 50% Probability.
AND (ISNEW(), Probability >= 0.50, NOT( $Profile.Name = "System Administrator"), NOT( $Profile.Name = "CSDS Executive Support"), NOT( $Profile.Name = "Executive Support"), NOT( $RecordType.Name = "Bundle Sales Opportunity") )
Ugh! you're right... and it looks there's no handle to the $Owner.Profile (like there is with $User)
OwnerId<>"005700000011kmP"
Here is what I think will work. No syntax errors, but untested.
OwnerId<>"005500000011YxTAAU" && OwnerId<>"005500000011YxbAAE" && OwnerId<>"005500000011YB4AAM" && OwnerId<>"005500000011YxRAAU" && OwnerId<>"005500000011YxhAAE" && OwnerId<>"005500000012etTAAQ" && OwnerId<>"005500000011YAkAAM" && ispickval(Type,"Customer")
You rock!! Thanks so much!