function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bhagya manshanibhagya manshani 

how to Convert lead to Account Plz help

Pla help


Map the fields in Lead to Account by clicking on Map lead fields.


Then convert the lead to account using Convert button in detail page




bhagya manshanibhagya manshani

First of all Thanks You so much for Reply. i need to do using apex code ...............95% its has been done  using apex code.

doing final testing..............

bhagya manshanibhagya manshani

hi Dear ...........

 I have Done it...................... Proper Code to Convert Lead To Account & Contact

// Here is the Apex class  


public class tester {
public static void ConvertLead(lead[] leads)
  Database.LeadConvert[] leadsToConvert = new Database.LeadConvert[0];
  Database.LeadConvert converter = new Database.LeadConvert();
for (lead l : leads){
  String company = l.Company;
  account account = new account(name = company);
  insert account;
  //contact contact = new contact(firstname='test', lastname='test',;
 // insert contact;
 // converter.setContactId(;
   LeadStatus convertStatus = [Select Id, MasterLabel from LeadStatus where IsConverted=true limit 1];



// here is the trigger to call that class 


  trigger tester on Lead (after insert) {