You need to sign in to do that
Don't have an account?
Pascal
How Can I Compact This Code?
Map<Id,String> userEmail = new Map<Id, String>{};
List<User> userList = [SELECT Id, Email FROM User WHERE IsActive = TRUE];
Map<Id, String> acctMap = new Map<Id, String>{};
List<Account> acctList = [SELECT Id, Tech_Rep_Mgr__c FROM Account];
for(User u : userList){
userEmail.put(u.Id, u.Email);
}
for(Account a : acctList){
acctMap.put(a.Id, a.Tech_Rep_Mgr__c);
}
List<User> userList = [SELECT Id, Email FROM User WHERE IsActive = TRUE];
Map<Id, String> acctMap = new Map<Id, String>{};
List<Account> acctList = [SELECT Id, Tech_Rep_Mgr__c FROM Account];
for(User u : userList){
userEmail.put(u.Id, u.Email);
}
for(Account a : acctList){
acctMap.put(a.Id, a.Tech_Rep_Mgr__c);
}
Map<Id,String> userEmail = new Map<Id, String>{};
Map<Id, String> acctMap = new Map<Id, String>{};
for(User u : [SELECT Id, Email FROM User WHERE IsActive = TRUE]){
userEmail.put(u.Id, u.Email);
}
for(Account a : [SELECT Id, Tech_Rep_Mgr__c FROM Account]){
acctMap.put(a.Id, a.Tech_Rep_Mgr__c);
}