Include external JavaScript (js) file in editView of SugarCRM
It is very easy to include or embed external JavaScript (js) file with SugarCRM. The included js file can contain all necessary functions for possible events and other purpose through out the scope of the page.
Steps:
- Go to /modules/$Module_Name/metadata/
- Open editviewdefs.php file
- In templateMeta parameter, add following array
‘includes’ =>
array (
0 =>
array (‘file’ => ‘modules/$Module_name/js/extjsfilename.js’,
),
),
- Now, you can use the functions written inside the js file.
- Done!
Note: In templateMeta, you can see other parameters such as form, userTabs, syncDetailEditView, and so on. So, you just need to put above array in between them.
About SugarCRM
If you are not yet familiar with SugarCRM click on the logo.
![]()