• System Integration 35
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I'm trying to update a custom field (Conversion_Type) from Lead to Contact, any ideas why it's not updating?
 
trigger LeadConvType on Lead (after insert) {     Map<Id,String> Conversion_Type = new Map<Id,String>(); // Map of the converted Contact ID and the Lead Status     for(Lead lead : Trigger.new) {         if (lead.IsConverted) {             Conversion_Type.put(lead.ConvertedContactId,lead.Conversion_Type__c);         }     }     List<Contact> conContacts = [select Id from Contact WHERE Contact.Id IN :Conversion_Type.keySet()];     for (Contact c : conContacts) {         c.Conversion_Type__c = Conversion_Type.get(c.Id);     }     update conContacts; }

 
I'm trying to update a custom field (Conversion_Type) from Lead to Contact, any ideas why it's not updating?
 
trigger LeadConvType on Lead (after insert) {     Map<Id,String> Conversion_Type = new Map<Id,String>(); // Map of the converted Contact ID and the Lead Status     for(Lead lead : Trigger.new) {         if (lead.IsConverted) {             Conversion_Type.put(lead.ConvertedContactId,lead.Conversion_Type__c);         }     }     List<Contact> conContacts = [select Id from Contact WHERE Contact.Id IN :Conversion_Type.keySet()];     for (Contact c : conContacts) {         c.Conversion_Type__c = Conversion_Type.get(c.Id);     }     update conContacts; }