You need to sign in to do that
Don't have an account?
shweta kumari 25
List Inside Map issue
I have a Map defined as follows
Map<ID,List<Opportunity>> accMap = new Map<ID,List>Opportunity>>();
My requirement is I need to fill the List<Oppotunity> defined inside the map with data from the Opportunity object and accountIDs for the Map.
like select [ID,Name,Amount from opportunity to be filled inside the list and from opportunity we get the accountID and this will be in Map like
accMap.put(o.accountID) some thing like this.
I hope I am clear.
please let me code if possible how to achieve this scenario.
thanks
shweta
Map<ID,List<Opportunity>> accMap = new Map<ID,List>Opportunity>>();
My requirement is I need to fill the List<Oppotunity> defined inside the map with data from the Opportunity object and accountIDs for the Map.
like select [ID,Name,Amount from opportunity to be filled inside the list and from opportunity we get the accountID and this will be in Map like
accMap.put(o.accountID) some thing like this.
I hope I am clear.
please let me code if possible how to achieve this scenario.
thanks
shweta
All Answers
Please mark this as BEST ANSWER, if this helps solve your problem