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
Renato Barucco 1Renato Barucco 1 

Role Hierarchy for the logged in user

Hi, I want to create component to display the role hierarchy tree view based on the logged in user. When the user logged in , he can see a tree  with him as a root nodes and the underneath roles as sub nodes. 
I got a code from the link below:
 
https://sfdcdevelopers.com/2020/04/17/display-role-hierarchy-using-lightning-tree/
 
But this returns me a tree from the beginning, not as logged in user.
Thanks.
Nagarjuna ParalaNagarjuna Parala
Hi @Renato Barucco 1,

Thank you for posting your concern. May I recommend you to have a  conditional check in your logic for the current logged user role hierarchy and  consume the entire logic to derive the tree based on that.

I hope this will reslove your issue. Pelase do let me know if you need any further information on this.

Thank you
Nagarjuna