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

Activate validation rule based on user login


I have a problem with a validation rule.

I wish it worked only for certain users.

How can I do this?

Thanks for the replies.

Best Answer chosen by Admin (Salesforce Developers) 

Hi ,

For your specific I think you can make use of the global variable in salesforce that is $

It can be somewhat like below:-


AND (If ($'ppp' . true, false), Yourcondition{say ~ IsNew()})


the part in red is how you should modify your validation rule..

Hope this helps....