diff --git a/force-app/main/default/classes/CCON_Faculty_TDTM.cls b/force-app/main/default/classes/CCON_Faculty_TDTM.cls index 758301083..e25e66a92 100644 --- a/force-app/main/default/classes/CCON_Faculty_TDTM.cls +++ b/force-app/main/default/classes/CCON_Faculty_TDTM.cls @@ -323,7 +323,6 @@ public with sharing class CCON_Faculty_TDTM extends TDTM_Runnable { ]; Map>> contactIdAccountIdAfflList = new Map>>(); - Map> acctAffl = new Map>(); for(Affiliation__c affl : affls) { // Check if Contact ID key exists @@ -334,16 +333,14 @@ public with sharing class CCON_Faculty_TDTM extends TDTM_Runnable { contactIdAccountIdAfflList.get(affl.Contact__c).get(affl.Account__c).add(affl); } else { // Create empty map and add Account ID to Affiliation Map - acctAffl.clear(); - acctAffl.put(affl.Account__c, new List{affl}); + Map> acctAffl = new Map>{ affl.hed__Account__c => new List{affl} }; contactIdAccountIdAfflList.get(affl.Contact__c).putAll(acctAffl); } } else { - acctAffl.clear(); - acctAffl.put(affl.Account__c, new List{affl}); + Map> acctAffl = new Map>{ affl.hed__Account__c => new List{affl} }; contactIdAccountIdAfflList.put(affl.Contact__c, acctAffl); } } return contactIdAccountIdAfflList; } -} \ No newline at end of file +}