Background
I have this Apex SOQL query:
myMap = new Map<Id, AggregateResult>([SELECT OpportunityLineItemId,
MIN(ScheduleDate) Starts
FROM OpportunityLineItemSchedule
WHERE OpportunityLineItemId IN :opportunityLineItemMap.keySet()
AND ScheduleDate != NULL
GROUP BY OpportunityLineItemId]);
Which throws this error:
System.ListException: Row with null Id at index: 0
Questions
- Why?
- What am I doing wrong?
- How can I fix it?