You need to sign in to do that
Don't have an account?

Getting an error while trying to put some values into a map
Map<Id, list<Opportunity>> ret = new Map<Id,list<Opportunity>>();
for(Opportunity order : orders)
{
//list<Opportunity> POSO= [SELECT Invoice_Reference_Opp__c,AccountId,Amount,Net_cost__c,VAT__c,StageName,Additional_Order_Information__c from opportunity where opportunity.id=:order.id];
ret.put(order.Id,new list<opportunity>(order.Invoice_Reference_Opp__c, order.AccountId, order.CreatedDate.getTime(), order.Amount, order.Net_cost__c, order.VAT__c, order.StageName, order.Additional_Order_Information__c));
//ret.put(order.Id,new list<opportunity>(Invoice_Reference_Opp__c,AccountId,Amount,Net_cost__c,VAT__c,StageName,Additional_Order_Information__c from opportunity where opportunity.id=:order.id) );
//ret.put(order.Id,POSO);
ret.get(order.Id).Products = new List<POSProductDetailReturn>();
order.Sent_to_POS__c = true;
}
GETTING ERROR AS
Error: Compile Error: expecting a right parentheses, found ',' at line 19 column 73
for(Opportunity order : orders)
{
//list<Opportunity> POSO= [SELECT Invoice_Reference_Opp__c,AccountId,Amount,Net_cost__c,VAT__c,StageName,Additional_Order_Information__c from opportunity where opportunity.id=:order.id];
ret.put(order.Id,new list<opportunity>(order.Invoice_Reference_Opp__c, order.AccountId, order.CreatedDate.getTime(), order.Amount, order.Net_cost__c, order.VAT__c, order.StageName, order.Additional_Order_Information__c));
//ret.put(order.Id,new list<opportunity>(Invoice_Reference_Opp__c,AccountId,Amount,Net_cost__c,VAT__c,StageName,Additional_Order_Information__c from opportunity where opportunity.id=:order.id) );
//ret.put(order.Id,POSO);
ret.get(order.Id).Products = new List<POSProductDetailReturn>();
order.Sent_to_POS__c = true;
}
GETTING ERROR AS
Error: Compile Error: expecting a right parentheses, found ',' at line 19 column 73
//ret.put(order.Id,new list<opportunity>(Invoice_Reference_Opp__c,AccountId,Amount,Net_cost__c,VAT__c,StageName,Additional_Order_Information__c from opportunity where opportunity.id=:order.id) );
try commenting it correctly:
/*
ret.put(order.Id,new list<opportunity>(Invoice_Reference_Opp__c,AccountId,Amount,Net_cost__c,VAT__c,StageName,Additional_Order_Information__c from opportunity where opportunity.id=:order.id) );
*/