I am working on a customization for one of the Maximo Anywhere Applications, built on the IBM MobileFirst Platform.
I have implemented a custom JavaScript file, and am able to call the functions directly through the app.xml. However, I am unable to call functions contained in this file from other JavaScript Functions. Can you not make calls like this? Any assistance would be appreciated.
Please see the simplefied example below. This would fail on the call to the retNewVal function from the callFromApplication function.
simplified example:
callFromApplication: function(eventContext){
var selectedResource = eventContext.getResource().getCurrentRecord();
var val1 = 5
var val2 = retNewVal(val1);
selectedResource.set('property1', val1);
selectedResource.set('property2', val2);
},
retNewValue : function(val){
return val * 2;
},
Thanks!