When I’m converting contacts to leads I’d like to copy the whole contact information to the lead form. This works quite well except for email.
I’ve found out that in /include/generic/SugarWdgets/SugarWidgetSubPanelTopButtonQuickCreate.php you can tell Suite to copy contact information by doing:
$additionalFormFields['note'] = $defines['focus']->note;
However this does not work:
$additionalFormFields['email1'] = $defines['focus']->email1; $additionalFormFields['emailAddress'] = $defines['focus']->email1; $additionalFormFields['Leads0emailAddress0'] = $defines['focus']->email1;
which will create a hidden input element:
<input type="hidden" name="email1" value="email@example.com">
But unfortunately the input will not match the email field. I guess this is because SugarEmailAdress.js being loaded after the form which then resets the email field. Can anyone tell me what I’ve to do to get the email copied?