Find your content:

Search form

You are here

How can we attach all the activities on a lead to an account when the lead is converted?

 
Share

I am trying to convert a lead using

Database.LeadConvert lc = new database.LeadConvert();
lc.setLeadId(myLead.id);

LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE    IsConverted=true LIMIT 1];
lc.setConvertedStatus(convertStatus.MasterLabel);

Database.LeadConvertResult lcr = Database.convertLead(lc);
System.assert(lcr.isSuccess());

What happens to the activities of that lead? Do they also get attached to the converted account? If no how can we get them also moved for the contact


Attribution to: Prady

Possible Suggestion/Solution #1

As per the documentation at https://login.salesforce.com/help/doc/en/leads_notes.htm

All open and closed activities from the lead are attached to the account, contact, and opportunity

Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4675

My Block Status

My Block Content