I’m trying to add ‘Print to PDF’ to the Opportunities module and added the following to custom/modules/Opportunities/metadata/detailviewdefs.php :-
'AOS_GENLET' =>
array(
'customCode' => '<input type="button" class="button" onClick="showPopup();" value="{$APP.LBL_PRINT_AS_PDF}">',
),
The menu item appears, but when clicking i get the following error
"Uncaught ReferenceError: showPopup is not defined… at HTMLInputElement.onclick "…
I have looked at other modules (eg Accounts) and the code for button array is the same, what could be causing the error? I have deleted the custom folder and the error remains.