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
eduardofernandeseduardofernandes 

Activate validation rule based on user login

Hello

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) 
IspitaIspita

Hi ,

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

It can be somewhat like below:-

 

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

 

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

Hope this helps....