You need to sign in to do that
Don't have an account?
Jeremy Deseez
List of User Id in a List with the Forecasting Quota
Hi,
I have a List of User Id :
I don't know how to make it.
Thanks for your reponses :)
I have a List of User Id :
List<User> resultsusers = new List<User>(); resultsusers = [SELECT Id FROM User WHERE IsActive = TRUE AND ForecastEnabled = TRUE];And a List of ForecastingQuota :
List<ForecastingQuota> resultsquotas = new List<ForecastingQuota>(); resultsquotas = [SELECT Id,QuotaAmount,QuotaOwnerId FROM ForecastingQuota ORDER BY StartDate ASC];And I want to put the Id of the User with the Id of the ForecastingQuota and also his QuotaAmount in a new List.
I don't know how to make it.
Thanks for your reponses :)
Now you have a map of forecast quotas where the keys are the ids of all users. If you have a user without a quota then retrieving it from the allUserFqsByOwnerId map will return null.
Caveat emptor - I haven't compiled or tested this code, but it should get you started.
So can i return a Map ?
How can I return also the User with no Quota in the same List ?
Regards