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

Avoiding multiple sets and probably replace by set
Hello,
I have below loop where is loop across accounlist and create few set.
Loop{
populate set 1
populate Set 2
}
use set 1
use set 2
Is there a way to store both set in same map and use the map
like map.set1 ,map.set2
I have below loop where is loop across accounlist and create few set.
Loop{
populate set 1
populate Set 2
}
use set 1
use set 2
Is there a way to store both set in same map and use the map
like map.set1 ,map.set2
Set<String> setOne = new Set<String>(); Map<String,Account> mapEmailAccount = new Map<String,Account>(); List<Account> lstAccountToUpdate = new List<Account>(); for(Account oAccount: lAccounts){ if(!somecondition){ if(oAccount.Email!=null){ setOne.add(oAccount.Email); mapEmailAccount.put(oAccount.Email,oAccount); } lstAccountToUpdate.add(oAccount); } }




referencing this way map.set1 ,map.set2 wont be possible with map.