Convert lead to opportunity - Sales stage / probability

Hi all,

As you know, the sales stage and probability % are linked on the opportunity edit form. I have a custom field called “weighted_opportunity_amount” which calculates the amount * probability percentage.

I want the users to be able to use the convert lead to opportunity form, as it automatically creates a lot of the links to contacts/accounts etc. However, those two fields on the convert lead form are not linked. I guess the javascript isn’t included on the lead conversion form, so can someone point me in the right direction?

I have included the following in custom/modules/Leads/metadata/convertdefs.php under ‘templateMeta’

'javascript' => '{$PROBABILITY_SCRIPT}',

And have created a custom copy of modules/Leads/views/view.convertlead.php and included the probability script from modules/Opportunities/views/view.edit.php.

A quick repair/rebuild but it does not work.

Any help appreciated.

Can you check if your custom copy of the file is getting loaded? Try logging something when it runs.

I decided against trying to mimic the full form in the lead conversion view in the end, so I never got to the bottom of this.

It would be nice if users were forced to use the full form instead of the condensed version.