You need to sign in to do that
Don't have an account?
Laura Spellman
Querying the Forecast Heirarchy
Hey there,
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 heirarchy' 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 Heirarchy for Direct Reports and subordinate users instead? I can not find any info on an object that contains this information.
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 heirarchy' 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 Heirarchy 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 ForecastUserId field:
The ID of the forecast manager associated with this role. The label is User ID.
You can see whether an individual User record has forecasting enabled using the ForecastEnabled field:
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.
Hope this helps.
Kindly mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
All Answers
It's still based on UserRole, as far as I understand. That object has a ForecastUserId field:
The ID of the forecast manager associated with this role. The label is User ID.
You can see whether an individual User record has forecasting enabled using the ForecastEnabled field:
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.
Hope this helps.
Kindly mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra