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

validation rule on lookup field based on role

The requirement is when a role is creating a case lookup field should not be null

There is a sub role called as "Member_PA" under system Administrator role. and there are two roles Member and PA.

The requirement is if member enters a case validation rule should not fire but if a members PA enters a case validation rule on lookup test field should fire.

lookup field - REP_Customer_Representative__c (lookup to Account)

This is what i came up with but validation rule fires despite the roles.

AND( ISBLANK(REP_Customer_Representative__c),
$UserRole.Name <> "Member_PA" )

Any help is appreciated.

Hi ,


AND(( ISBLANK(REP_Customer_Representative__c), ($UserRole.Name == "Member_PA" ) )