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
Chandra Sekhar CH N VChandra Sekhar CH N V 

Validation rule on user object

Need a validation rule on user object to check if a field is not null but can be empty for two specific user records. Tried the below :
ISBLANK( WWID__c ),OR(($User.Id <> '<some user ID>'),($User.Id <> '<some user ID>'))
Shyama B SShyama B S
Hi Chandra,
Can you give this a try? I just reversed the expressions.
IF(OR(($User.Id = '<some user ID>'),($User.Id = '<some user ID>')),false

Please let me know if this helped you.

Chandra Sekhar CH N VChandra Sekhar CH N V

That didn't work as expected. It was throwing error message for the specified user as well.
AND ( 
$User.Id <> 'someuserID' || $User.Id <> 'someuserID'

Hi Chandra, 

Above should do the trick :)