How to user "ScriptLoader" or "ProblemModalUIHelpers" in Agent Workspace?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2020 08:35 PM
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?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2020 06:39 AM
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');
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 02:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 10:48 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 04:47 AM
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