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
Rishabh Chauhan 6Rishabh Chauhan 6 

How to use Lookup filters for role hierarchy

I want to achieve one requirement that when Manager A logs in to his Org, then he should see only employees under him not under any other manager using lookup. Can someone help me to achieve it?
NagendraNagendra (Salesforce Developers) 
Hi Rishabh,

I guess better approach for this will make a lookup field and put a lookup filter saying his role is the manager or make a checkbox for that user of formula type and mark it then put a lookup filter to get only those records.

There is a field called ManagerId in User Object standard field one can use that write a small rule or trigger

For more information please check below blog post from the community which might help you further with the above requirement.
Thanks,
Nagendra
anna downeyanna downey
Thank you