So I am a total newb here and I am sure I'm missing something easy but can anyone tell me why the key isn't being set thus resulting in a null point exception?
trigger Contact_Assignment_ET on Exact_Target__c (before insert) {
Set<String> CIFs = new Set<String>();
for (Exact_Target__c et : Trigger.new)
CIFs.add(et.Customer_Identifier__c);
Map<String, Contact> contacts = new Map<String, Contact>([SELECT Id FROM Contact WHERE CIF__c in : CIFs]);
for(Exact_Target__c et :trigger.new)
et.Contact__c = contacts.get(et.Customer_Identifier__c).Id;
}
I am getting a NullPointer Exception:
System.NullPointerException: Attempt to de-reference a null object: Trigger.Contact_Assignment_ET: line 13, column 1