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.

1 Answer 1


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. 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.

  • Awesome, this all makes sense. Do you know if this association will always be there? for example, if I check the ForecastEnabled box for a user, will it add their name to the forecast heirarchy screen? I'm a little unclear on how closely these are tied.
    – laurspellm
    Commented Dec 27, 2017 at 22:16
  • @laurspellm Yes updating these values programmatically reflects in that UI.
    – Adrian Larson
    Commented Dec 28, 2017 at 1:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .