I will need to create my own "convert lead" button because I need to ensure that certain fields are updated when the button is clicked.
However, I was wondering if there is a quick way of doing this, because usually when converting a lead, we have the option of creating an opportunity, contact and account. Can I maybe create a button that, when clicked, populates the fields that I need to populate and then reroutes to the standard lead conversion process?
Tia.
Best Answer
There is a Database.leadConvert method available documented in LeadConvert Class.
So yes, you could create e.g. a JavaScript button that calls your own WebService method that does whatever population you need and then calls Database.leadConvert.