function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Ma<Id,List<Opportunity>> accountOppMap = new Map<Id,List<Opportunity>>(); for(Opportunity opp : [Select id,accountId from opportunity]){ List<Opportunity> opplst = AccountOppMap.get(opp.AccountId); if(opplst == null) opplst = new List<Opportunity>(); opplst.add(opp); accountOppMap.add(opp.accountId,opplst); }
Here is the sample code :-