+ Start a Discussion
ABakABak 

Convert Lead to Contact issue

I am having an issue while converting lead to contact.

 

Requirement : If theres an existing contact for a lead (it gives us the option while doing a convert) , then I want to add a number field on lead onto an already existing number field on contact

 

My approach: I have a trigger which is fired on a lead update where I check whether the lead has been converted or not . If its converted then I query the contacts for the record with the id lead.ConvertedContactId

 

I was hoping I can get that contact record and add the value on that particular field.

e.g con.field += lead.field. and then update the contact.

 

My issue is that the contact record that queried for shows that the field value is null even though the contact record shows a field value (some number) in salesforce before merging the lead.

 

I tried my best to explain this. It would be great if someone can guide me here.

 

Thanks

jkucerajkucera

What about a workflow update?  I'm not sure if you can get the current value of the desired Sum field, but might work.

 

If not, please post your code.