You need to sign in to do that
Don't have an account?
Lead Conversion via APEX code - ConvertedDate
Hi
We are getting the following message: "This lead was converted on {0}", when converting a Lead via APEX code using "ConvertLead" method.
Observation: We noticed the standard field "ConvertedDate" was null after we converted the Lead through code. When we converted the Lead by using SFDC standard Convert button, the "ConvertedDate" field is filling properly with today's date.
Did we miss anything or is there a bug in the API?
Thanks in Advance
-----------------------------------------------------------------------------------------------------
Here is the code we are using for the conversion:
Database.LeadConvert LC = new database.LeadConvert();
LC.setAccountId(MatchingAccounts[0].Id);
LC.setLeadId(LeadNew[Ld].Id);
LC.setDoNotCreateOpportunity(true);
LC.setConvertedStatus('Converted');
Database.LeadConvertResult LCR = Database.convertLead(LC);
Lead.IsConverted is false. We are converting a brand new Lead, after the conversion the Lead.IsConverted is set to True by the API but it is not setting the field ConvertedDate.
Thanks