Upload Custom Javascript

Hi,

I'm working on a project at sugarcrm on demand instance.

I need call an API when i add a new line item on Quotes module for get the product price and stock.

I'm trying to insert a new JS file but it dosent work, someone can help me. I follow this instrucctions on sugar documents that show here 

Regartz,

Claudio Viva.

  • Hi Claudio Viva 

    As per the documentation you highlighted in your thread, the content of file Files/custom/Extension/application/Ext/JSGroupings/<file>.php may looks like that:

    <?PHP
    foreach($js_groupings as $key => $groupings)
    {
       foreach($groupings as $file => $target)
       {
          if ($target == 'include/javascript/sugar_sidecar.min.js')
          {
             $js_groupings[$key]['custom/include/javascript/sugar7/plugins/Mask.js'] = 'include/javascript/sugar_sidecar.min.js';
          }
          break;
       }
    }

    You just need to override the file 'custom/include/javascript/sugar7/plugins/Mask.js' by the one you want to inject into a minified SugarCRM javascript file.

    Cheers

    André Lopes
    Lampada Global
    Skype: andre.lampada