I want to create a lookup field to User in the Custom object. This lookup should display the list of users who are Managers of other users.
How this can be achieved.
Thanks in advance.
|
I want to create a lookup field to User in the Custom object. This lookup should display the list of users who are Managers of other users. How this can be achieved. Thanks in advance. |
|||
|
|
|
The closest I can think of if a filtered lookup where you can only lookup managers. Since the manager lookup is a recursive one on User, it would be hard to filter on I magine, unless a manager cannot have a manager. |
|||||||||||
|
|
I guess better approach for this will be make a look up field and put a lookup filter saying his role is manager or make a check box for that user of formula type and mark it then put a look up 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 |
|||||||
|
|
Perhaps you could leverage Jeff Douglas's code here: http://blog.jeffdouglas.com/2011/02/15/find-my-salesforce-users-by-role-hierarchy/ |
|||
|
|