trigger trigger_LeadConverted on Lead (before insert) {
Map<String,Lead> newMpaToCon = new Map<String,Lead>();
for(Lead l : Trigger.new){
newMpaToCon.put(l.ContactId , l) ;
}
Map<Id,Contact> con =new Map<Id,Contact>([Select id ,email from contact where id in :newMpaToCon.keySet()]);
for(Lead l : Trigger.new){
Contact c =con.get(l.contactId) ;
if(l.email ! = c.email){
l.Protivity__c = c.email ;
}else{
l.Activenet__c = c.email ;
}
}
}
Thanks for your reply. but this is not my requirement. Activenet or Protivity are not fields in Lead. Those are Sources for saving contacts data before getting into salesforce contact object. From that source we getting data into Salesforce through packages.
Thanks for your reply. but this is not my requirement. Activenet or Protivity are not fields in Lead. Those are Sources for saving contacts data before getting into salesforce contact object. From that source we getting data into Salesforce through packages.