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
AJHAJH 

Using the ManagerID field on the User record to build a reporting hierarchy

Hello Community-

 

We do a pretty good job of maintaining the Manager field on the User record for all SFDC users.  We'd like to be able to use this comprehensive maintenance to help us build reporting heirarchy pictures.  At first I thought this would be relatively straight forward, but I'm having difficulty finding a way to make criteria:

 

where manager = John Q CFO OR

manager's manager = John Q CFO OR

manager's manager's manager = John Q CFO etc.

 

I assumne there's a 7 level max before we get to the CEO.

 

I tried to build this with a custom report type (user --> User (Manager)) and tried to make it go 4 objects deep - still can't reflect the hierarchy in a report.

 

My next idea is to run the query somehow with a visualforce page - anybody know how to do this and/or have any other elegant solutions?

 

Thanks!

-Aaron

Andy BoettcherAndy Boettcher

Why wouldn't you just use the built-in Role Heirarchy functionality?

AJHAJH

We setup SFDC roles to enable the proper record visibility and access, but not to duplicate the reporting heirarchy.  For example, many sales admins are higher in the role heirarchy than the person (sales manager) the admin reports to - this grants the admin the proper record visibility and capability. 

 

I believe this is a best practice as prescribed by Salesforce.com.

 

We would like to find a way to dynamically create user reporting structures from within SFDC.  Our current process is to set up each new user also as a "Contact" on a dummy account, then associate the proper manager to the "reports to" field, then use the contact heirarchy on the dummy account to create a visual.  It's certainly not the best solution and is prone to errors, but is barely OK for now.

 

Thanks for the idea though,

 

Aaron

Andy BoettcherAndy Boettcher

I fear the report path you're taking would become too complex too fast and you'd hit some functionality limit before you succeeded.

 

Alternate path - have you looked around the AppExchange for any org packages?  I did a quick one and found OrgView - it doesn't have a lot of documentation immediately available, but with you using the Manager field it may be of service?

 

http://appexchange.salesforce.com/listingDetail?listingId=a0N300000016aahEAA

 

Outside of the AppExchange, you would be looking at some sort of custom build.

 

-Andy