custom jsGrouping no running

I've done a custom javascript grouping according to the documentation, see link

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/Extension_Framework/JSGroupings/

I can se the new js file in the cache folder but the js code dont run when loading Sugar web application so the new variables in the grouping file dont get defined. Does any one have experience about this or any clue why it doesn't work?

Best Regards

Gustav LIndström

Parents Reply
  • Hi Gustav Lindström,

    I have done this customization you have to use below code it's work for me.

    Location : ./custom/Extension/application/Ext/JSGroupings/newGrouping.php

    <?php

    foreach ($js_groupings as $key => $groupings) {

        foreach ($groupings as $file => $target) {

            if ($target == 'include/javascript/sugar_grp7.min.js') {

                $js_groupings[$key]['custom/javascript/customFile.js'] = 'include/javascript/sugar_grp7.min.js';

            }

            break;

        }

    }

    Location :./custom/javascript/customFile.js

    (function(app) {

        console.log(app);

        console.log(SUGAR.App);

    })(SUGAR.App);

    This code is work for me.

    Thanks.

Children
No Data