function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
alex_from_75015alex_from_75015 

Get all roles that are attached under a given role

Hello

Let's sayt that I have this role (organization)

Manager - France - Paris

Manager - France - Lyon

Manager - US- NY

Manager - US- LA

 

How can I get through a simple select all roles attached to "manager" ie France, US (easy : ParentRoleId) but also Paris, Lyon, NY, LA -> which mean a kind of recursive loop : get all children of manager then get all children of children then get all children of children of children...

 

Thanks for your help