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
lilranger74lilranger74 

Validation Rule Help

I have a validation rule that does not seem to be working properly.  

The rule should not affect users with the profile of system admin or a specific user id.  I'm am logging in with the specific user but the error message still comes up.  The user should be able to change the probability from 98% to 97%.

 

AND ( 
OR( 
$Profile.Name<>"System Administrator", 
$User.Id <>"xxxxxxxx"), Probability <> 0.98, ISPICKVAL( StageName, "Too early to Bill"))

 

Any help would be greatly appreciated.

 

Thank you!

Best Answer chosen by Admin (Salesforce Developers) 
liron169liron169

Hello,

According to what you wrote, you shouldn't use OR.
You want to fire the validation if the user is not Admin and not specific user.

 

 

AND ( 
$Profile.Name<>"System Administrator", 
$User.Id <>"xxxxxxxx", 
Probability <> 0.98,
ISPICKVAL( StageName, "Too early to Bill"))