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
Salesforce BlitzSalesforce Blitz 

find parent user name of user in apex

I have a user, who has a different as head in role hierarchy.

I need to fetch the parent user name of given user

Thanks
Rupali PophaliyaRupali Pophaliya
Here is a way to find users who works beneath logged in user or parent in the role hierarchy.

http://blog.jeffdouglas.com/2011/02/15/find-my-salesforce-users-by-role-hierarchy/
Salesforce BlitzSalesforce Blitz
I need to get the parent role of given user.

Bottom-up approach.

Thanks