You need to sign in to do that
Don't have an account?
inbox outbox 7
Map<Id,List<Opportunity>> addOppurnitieswithaccount = new Map<Id,List<Opportunity>>();
Roll up summary kind of thing.
I am just lost.
Map<Id,List<Account>> acctsWithOpps = new Map<Id,List<Account>>();
System.debug(acctsWithOpps.values());
List<Opportunity> oppl = [SELECT Account.Name, Name FROM Opportunity WHERE Id =: acctsWithOpps.values()];
for(Opportunity opp: acctsWithOpps.values()){
system.debug(opp.Name);
}.
Please advice.
I want to show account with related opportunities, without using inner query and by using map with either <Id, Sobject>
Map<Id,List<Opportunity>> addOppurnitieswithaccount = new Map<Id,List<Opportunity>>();
Roll up summary kind of thing.
I am just lost.
Map<Id,List<Account>> acctsWithOpps = new Map<Id,List<Account>>();
System.debug(acctsWithOpps.values());
List<Opportunity> oppl = [SELECT Account.Name, Name FROM Opportunity WHERE Id =: acctsWithOpps.values()];
for(Opportunity opp: acctsWithOpps.values()){
system.debug(opp.Name);
}.
Please advice.
Can you please explain, what is your exact requrement.
Thanks!!
Try with below code.
If this helps, Please mark it as best answer.
Thanks!!