• Surendra Muthye
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
We are trying to access data from ForecastingItem using Apex. The code works fine in Execute Anonymous window of Developer Console. When we try to put it as a method in Apex class, we are unable to do so. 

We have 4 Forecast Types defined and have not changed any picklist values anywhere - it is an out-of-the-box environment. 

Code:
public List<ForecastingItem> getForecastItems(List<Id> userIdList, List<Id> periodIdList, List<Id> forecastTypeList) {

List<ForecastingItem> forecastItemList = [SELECT AmountWithoutAdjustments, AmountWithoutManagerAdjustment, 
ForecastAmount, ForecastCategoryName, ForecastingTypeId, 
ForecastQuantity, HasAdjustment, Id, IsAmount, IsQuantity, 
IsUpToDate, OwnerId, OwnerOnlyAmount, OwnerOnlyQuantity, 
ParentForecastingItemId, PeriodId, ProductFamily, 
QuantityWithoutAdjustments, 
QuantityWithoutManagerAdjustment,
Owner.Name
FROM ForecastingItem
WHERE OwnerId in :userIdList
AND PeriodId in :periodIdList
AND ForecastingTypeId in :forecastTypeList
];

return forecastItemList;


User-added image
 
How can I put the Analytics app on iOS Simulator?