I am building a custom 'Customizable Forecast' tab from scratch using Visualforce and a custom controller to add some new features. One of my requirements is to forecast off of the 'forecast hierarchy' like the OOTB tab uses, defined in the Setup->Build->Customize->Forecasts (Customizable)->Forecasts Hierarchy. Until now, I've used the UserRoleId Field to find direct reports and subordinate roles/users. How can I use SOQL to query the Forecast Hierarchy for Direct Reports and subordinate users instead? I can not find any info on an object that contains this information.
It's still based on
UserRole, as far as I understand. That object has a
The ID of the forecast manager associated with this role. Label is User ID.
You can see whether an individual
User record has forecasting enabled using the
Indicates whether the user is enabled as a Forecast Manager (true) or not (false) in customizable forecasting. Forecast managers see forecast rollups from users below them in the forecast hierarchy.
Between these two fields, you should have all the data you would be able to pull from the
Forecasts Hierarchy screen.