Unable to call Ui script in Workspace ui action level
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Please find the workspace ui script
function logTelemetry(status) {
g_ui_scripts.getUIScript('UIActionPerformanceLoggerClient').then(function(perfLogger) {
var executionTime = new Date().getTime() - start;
perfLogger.logTime("Budgetary Quote: ", executionTime, status, g_form.getValue("number"));
});
}
Ui script :
Ui script :
var UIActionPerf = (function() {
function logTime(action, ms, status, number) {
var gaLog = new GlideAjax('UIActionPerformanceLogger');
gaLog.addParam('sysparm_name', 'logTime');
gaLog.addParam('sysparm_action', action);
gaLog.addParam('sysparm_time', ms);
gaLog.addParam('sysparm_status', status);
gaLog.addParam('sysparm_record', number);
gaLog.getXML();
}
return {
logTime: logTime
};
})();
Same script is working as expect in dev instance when comes to QA it is failing saying that
TypeError: Cannot read properties of null (reading 'logTime')
at eval (eval at get (GlideScopedScript.js:49:27), <anonymous>:9:24)
Same script is working as expect in dev instance when comes to QA it is failing saying that
TypeError: Cannot read properties of null (reading 'logTime')
at eval (eval at get (GlideScopedScript.js:49:27), <anonymous>:9:24)
0 REPLIES 0
