I want to create a validation rule on a look up field based on role . There are two roles
- Member Member – is a member
- Member PA – is a pa to the member
lookup fields – REP_Customer_Representative__c (lookup to Account)
The requirement is when a "member member" creates a case and if the look up field is blank the validation rule should not fire as REP_Customer_Representative__c – is a member representing field
But when a "Member Pa" creates a case he/she should not leave the lookup field REP_Customer_Representative__c – blank
and this is what i came up with, but the validation rule is not getting fired
AND( ISBLANK(REP_Customer_Representative__c),
$UserRole.Name = 'Member_PA' )
Best Answer
I don't know if this is the answer, but try:
I seem to recall the validation rules needing to look up a value on the parent (i.e.
REP_Customer_Representative__r.Id
), not just where there is a value in that field itself.Let us know if this works... or not.