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
MaheemSamMaheemSam 

Mass convert leads into account

Hi, 

   Please suggest me how to convert mass lead into account there are more than 1000+ leads which needs to be converted into account please suggest me a way in code. 

Thanks
Sudhir
Best Answer chosen by MaheemSam
Dushyant SonwarDushyant Sonwar
Sudhir , you need to just add the Mass Convert Leads button to the Leads List View layout and enable profile access to MassLeadConverterController Apex class and the MassLeadConverter page.

Hope this helps.

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Sam,

Sorry for this issue you are encountering.
User-added imageHere is a link to one of the free AppExchange apps that provide that functionality:   Hope this will help you.

Kindly mark this as solved if my reply was helpful so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra
 
MaheemSamMaheemSam
I am trying to achive this in custom code as below it is taking only 1 at a time please suggest me how we can convert set of leads into accounts. 
list<account> accList = new list<account>();
        Database.LeadConvert lc = new Database.LeadConvert();
        lc.setLeadId('00Q0v0000037iiY');
        lc.setLeadId('00Q0v0000037iid');
  
        system.debug(lc);
            
        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());
        
        
        Account acc = new Account(id=lcr.AccountId);
        accList.add(acc); 

  	    //insert accList;


 
Dushyant SonwarDushyant Sonwar
MaheemSam ,
It's better to use the appexchange  app in this kind of requirement rather than custom development. If this app does not fulfill your business requirement , then you should go with custom development.

Mass Lead Converter:
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000004g33vEAA

Thanks,
MaheemSamMaheemSam
Thanks for you reply have installed this app there is no user guide in the link how to use this app can you please tell me the steps if you have used this app installing. 

Thanks
Sudhir
Dushyant SonwarDushyant Sonwar
Sudhir , you need to just add the Mass Convert Leads button to the Leads List View layout and enable profile access to MassLeadConverterController Apex class and the MassLeadConverter page.

Hope this helps.
This was selected as the best answer
MaheemSamMaheemSam
Hi Dushyant, 

     Sorry for the delay in my reply I am able to see the button and visualforce page can you tell me steps how to add Mass Convert leads button on leads list view 

    Please tell me the steps to add. this willl be great help you actually answered my question will mark this answered. 

Thanks
Sudhir
Dushyant SonwarDushyant Sonwar
Sudhir,

You need to go to the search layout of the lead and there you can add the button.
https://<Your Salesforce Domain> /ui/setup/layout/ListLayouts?type=Lead&setupid=LeadSearchLayouts&retURL=%2Fui%2Fsetup%2FSetup%3Fsetupid%3DLead

Hope this helps.
Imran Shaikh 56Imran Shaikh 56
hey dushyant i am newbe in salesofrce i dont know how to add mass convert button on lead page please help me....
Ron SupportRon Support
One option is to use the salesforce api, another solution would be to use the following solution, it can convert unlimited amount of leads!

https://www.zaapit.com/page/Mass-Convert-Merge

mass convert leads