You need to sign in to do that
Don't have an account?
RarLopz
Method does not exist or incorrect signature: void add(Id, String) from the type Map<Id,String>
I am trying to optimize my working code. When i tried to convert a set into a Map, I am getting an error -
Line: 10, Column: 22
Method does not exist or incorrect signature: void add(Id, String) from the type Map<Id,String>
Line: 10, Column: 22
Method does not exist or incorrect signature: void add(Id, String) from the type Map<Id,String>
Map<ID, String> mapAccountBillingAddress = new Map<ID, String>(); for (AggregateResult aggregate : [Select count(Id),BillingStreet str,BillingCity ct, BillingState stt, BillingPostalCode pc From Account Group By BillingStreet,BillingCity,BillingState,BillingPostalCode HAVING (count(BillingStreet) > 1 AND count(BillingPostalCode) > 1 ) ] ) { mapAccountBillingAddress .add(aggregate.id, ((String)aggregate.get('str')+(String)aggregate.get('ct')+(String)aggregate.get('stt')+(String)aggregate.get('pc'))); }
You cant use "add" to put values in Map chnage this line.
Thanks
Anil.B
All Answers
You cant use "add" to put values in Map chnage this line.
Thanks
Anil.B