1

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

enter image description here

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:

  1. Query the OpportunityStage table and select ForecastCategory and ForecastCategoryName - This won't work if any Forecast Category has no corresponding Stages
  2. Query the Opportunity table and select ForecastCategory and ForecastCategoryName - This won't work if any Forecast Category has no corresponding Opportunities

Is there somewhere I can access the complete list?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.