I'm trying to create a validation rule.
There is a user Field(lookup to user), say(test__c) on object X. I would like to ensure if value is this field is changed, then role of new user should remain same as of existing user.
I thought I'll use isChanged or PriorValue functions. for e.g
Ischanged(test__r.UserRoleID) or PriorValue(test__r.userRoleID) <> PriorValue(test__r.UserRoleID)
But issue is both these functions can't work on reference(look up) fields.
I made it work by creating New Formula field having RoleId and applying these functions on that. It is working fine.
My issue is , can it be done without creating new Formula field?. Just for validation Rule, I don't want to create new (formula) Field. We already have 100s of field on same object.