How to user "ScriptLoader" or "ProblemModalUIHelpers" in Agent Workspace?

PhoenixMing0912
Giga Expert

Hi all,

In UI Action, the following client script is defined, however, this script doesn't work for Agent Workspace.

How can I do the same thing for Agent Workspace?

find_real_file.png

 

5 REPLIES 5

Willem
Giga Sage
Giga Sage

You are right, scriptloader is not supported in Agent Workspace.

It is not available for Service Portal, Mobile, or Agent Workspace.

https://developer.servicenow.com/dev.do#!/reference/api/orlando/client/c_ScriptLoaderAPI

 

Can you try the following:

g_ui_scripts.getUIScript('ProblemModalUIHelpers').then(function (script) {
    script.ProblemTask_MoveToAssess();
}, function () {
    console.log('The script did not load');
});

 

Willem
Giga Sage
Giga Sage

@PhoenixMing0912 Did my answer help you solve the issue? If so, kindly mark answer as Correct. If not, let me know how I can help.

Actually, I didn't try your solution but copied the script into workspace script from UI scripit.

I have to say my solution is not a good one, yours is more reasonable if it works.

I will keep an eye on that later, thanks for the help.

Hope you are doing well.

Is your question resolved? Or do we need to follow-up on this?

Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.

Kind regards,

Willem