How can we add custom js file in convert lead view?
Welcome back @brock.sudeep!
The meatadata file modules/Leads/metadata/convertdefs.php, as a regular view’s metadata, supports the attribute “includes”, which let you add a custom js file. Take a look at modules/Accounts/metadata/editviewdefs.php, copy the attribute “includes” from its metadata to convertdefs metadata at the exact location and modify its value accordingly.
Remember to run Quick Repair and Rebuild.
Hi andopes ,
Thanks for the reply. I did the same but it does not work for me also run Quick Repair and Rebuild. Can you so me an example that can help me?
Actually convertdefs doesn’t work like a regular view’s metadata.
instead you have to extends the ViewConvertLead (modules/Leads/views/view.convertlead.php) and override the method getValidationJS in order to inject some additional js code.
You need to run Quick Repair and Rebuild anyway.