You need to sign in to do that
Don't have an account?

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.
Thanks
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.
Thanks
Use
AND(( ISBLANK(REP_Customer_Representative__c), ($UserRole.Name == "Member_PA" ) )
Regards,
Ashish