AnsweredAssumed Answered

Getting JS Error: 'SUGAR is not defined' in an entrypoint page of SugarCRM 6.5.14

Question asked by Udayakumar Sarangapani on Oct 17, 2014
Hi Experts,

I have a customized entrypoint page and I added the following lines of JS code:

function updateDropdownFields(field) {   alert( + ' xxx ' + field.value);          for(targetFieldName in updateDropdownFieldsDefs[][field.value]) {                  var targetField = document.getElementById(targetFieldName);                  var newDropdownOptions = SUGAR.language.get('app_list_strings', updateDropdownFieldsDefs[][field.value][targetFieldName]);                    for(i = targetField.options.length - 1 ; i >= 0; i--) {                          targetField.remove(i);                  }                    for(i in newDropdownOptions) {                          opt = new Option(newDropdownOptions[i], i, false, false);                          targetField.options[targetField.options.length] = opt;                  }          }  }

I am getting JS error i.e., 'SUGAR is not defined'.

Have I missed to add any JS file in my entrypoint page?

Or Can't I use SUGAR in customized entrypoint page?

Please let me know.

Thanks in advance.