Convert Leads from Account Page
Business Problem
So you have the Leads related to Accounts based on the match between the Lead's email address domain and the Account's website domain. If you don't, check out this article on how to get the free app to automate this for you. Now your users want to convert Leads right from the Account page and of course, they want to convert more than one at a time!
We have added a new feature to the Relate Leads to Accounts free AppExchange package that will allow you to accomplish this. Version 1.2 of the Relate Leads to Accounts contains these new components:
- Custom Convert (Custom List Button on Lead Object) - this button is used on the Lead related list on the Account page.
- BN_CustomConvertLeadPage (VisualForce Page) - this page is called by the Custom Convert button when it is clicked and has an action that is called when the page loads. It also displays any error messages received from validation rules or duplicate rules.
- BN_CustomConvertLeadController (Apex Class) - this class is invoked by the Custom Convert button via the VisualForce page action. The apex class has the method that will take all the selected leads and call the DML convert action for all of them and sends a failure message to the VisualForce page if an error occurs.
- BN_CustomConvertLeadController_Test (Apex Class) - this is the test class for the CustomConvertLeadController class.
How to Configure the App
- Install the free app from the AppExchange and make sure to install for all of the profiles that will be using this.
- Go to Setup | Object Manager | Account | Page Layouts.
- Select the page layout you would like to add the custom button to and scroll down to the Leads related list. Click the wrench icon.
- Save your page layout.
That's it, now you are ready to start testing!
Error Handling
If an error occurs with one of the Leads during the conversion process, you will receive a message that looks like this. In this example, there was a validation rule that required the Contact to have a zip code that matched the Account. The error message contains a link so the user can easily navigate back to the Account page.
For any questions, comments, concerns – let us know in the comment section below!
We would love to hear from you!
Hi Anjana thanks for developing such tool. So proud . I need favor. Do we have same customization of converting mass leads on Lead it self rather having it on Account as related list. I need mass conversion on lead itself.
Hi Naveen,
We apologize for the delayed reply, comments have been disabled on our website and we are just seeing these. Unfortunately, we do not have a mass convert tool from the Lead object. We can put this on the list to build one day and reach out to you if we do!