AnsweredAssumed Answered

Unable to load custom js file on Sugar 7

Question asked by Mukta Patel on Oct 31, 2014
Latest reply on Nov 20, 2014 by Matt Marum
I need to load a custom js file on Contacts module in Sugar 7 version.

I did following : 

In custom/Extension/application/Ext/JSGroupings/mycustom_js_groupings.php

$js_groupings[] = $sugar_grp_sidecar = array_merge($sugar_grp_sidecar,    array(
        'custom/modules/Contacts/js/auto.js' => 'include/javascript/sugar_sidecar.min.js',

Made Repair & Rebuid , JS Groupings Rebuild and then again a Repair.

And in auto.js

alert('JS Loaded');
$(document).on('load', function() {
alert('Doc Loaded!');

Here the message "JS loaded" is loaded much before the view is loaded and the second alert message is never loaded.