Skip to main content
2 of 2
correction based on comment
Jenny B
  • 10.6k
  • 3
  • 26
  • 51

You could create a formula field on the object that holds the Owner.UserRole.Name then use that in your validation rule like:

AND(
   ISCHANGED(OwnerId),
   PRIORVALUE(Owner_Role__c) <> Owner.UserRole.Name
)  

Which would only allow users to change the owner if the existing owner has the same Role as the new owner.

Jenny B
  • 10.6k
  • 3
  • 26
  • 51