Salesforce Fact #545 | $UserRole in formula
We can use $UserRole global variable in formula field and validation rule to get the role of the current user, Similar to flow. However, the ' ParentRoleId ' field is not accessible in formula.
This blog contains some of the Salesforce facts which I have found quite interesting. Happy learning.