I'd like to programatically (in Apex or SOQL) get the full list of ForecastCategories and their corresponding ForecastCategoryNames for an org i.e. the list that you can access in the UI by navigating within Setup to Opportunities -> Fields -> Forecast Category
There doesn't seem to be a database table with these mappings. I can think of a couple of approaches but neither are guaranteed to be complete:
- Query the
OpportunityStage
table and selectForecastCategory
andForecastCategoryName
- This won't work if any Forecast Category has no corresponding Stages - Query the
Opportunity
table and selectForecastCategory
andForecastCategoryName
- This won't work if any Forecast Category has no corresponding Opportunities
Is there somewhere I can access the complete list?