Roles & Subordinates / Role Hierarchy

  • 2
  • Question
  • Updated 5 years ago
A common use case for creating lists viewed on Tabs is a view of "My Objects" and "My Teams Objects". The first is based on Record Owner = Record Viewer, the second is based on the concept of Roles & Subordinates.

I am sure I could create model conditions to filter these values explicitly, but if I were to modify the Role Hierarchy the filters may no longer be applicable.

Is it possible to condition a model based on "Roles & Subordinates"?

Thanks,

Jacob
Photo of Jacob Flatter

Jacob Flatter

  • 1,512 Points 1k badge 2x thumb

Posted 5 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
If you are only interested in traversing down one level in the role hiearchy then a model condition can be created that will filter records.  

The field evaluated should be  the records "Owner.UserRole.ParentRoleId"

And the value for the condition should be user information of the active user - and thier Role property.   

See the picture below. 


Extending the condition another level back, so that you could see records owned by users with a grandchildren role would be really cool, but I don't think that is possible declaratively.   

Hope this helps some.