- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2021 11:47 PM
We are migrating the team into Agent Workspace and they love it.
But i cant get the "Request Approval" UI Action to work in the Agent Workspace. It works fine in the classic UI. The button appears in the Agent Workspace, but clicking the button does nothing. What am i missing? Screenshots below.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2021 08:29 PM
Hi Gerard,
the correct code for the field "Workspace Client Script" must be as follows:
function onClick(g_form) {
var ga = new GlideAjax("ChangeRequestStateHandlerAjax");
ga.addParam("sysparm_name", "getNextStateValues");
ga.addParam("sysparm_change_sys_id", g_form.getUniqueValue());
ga.addParam("sysparm_change_type", g_form.getValue("type"));
ga.getXMLAnswer(function(stateValues) {
var returnedStates = JSON.parse(stateValues);
g_form.setValue("state", returnedStates[0]);
g_form.submit('state_model_request_assess_approval');
});
}
There were two lines that do not work at Workspace and therefore were replaced by a modified version:
old | new |
var returnedStates = stateValues.evalJSON(); | var returnedStates = JSON.parse(stateValues); |
gsftSubmit(null, g_form.getFormElement(), 'state_model_request_assess_approval'); | g_form.submit('state_model_request_assess_approval'); |
To my mind it makes no sense to "repair" all UI Actions for change requests. At the moment, the Agent Workspace is not a fully functional replacement for the classic user interface and there are some tools which cannot be rendert at Workspace (for example Confict Calendar).
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 02:29 AM
Apologies for the delay Maik,
Had a few priority issues crop up. I had one of the team put this in and try it this afternoon and still not working as hoped. I will investigate a bit further and let you know.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 03:31 PM
Hi Maik,
As Gerard said, I can confirm that altering the Workspace Client Script to what you suggested previously did not change anything unfortunately.
We receive this in the browser console:
js_includes_clientScript.js:4608 Unhandled exception in GlideAjax. Cannot read property '0' of null
If you have any further suggestions, we would greatly appreciate it!
Thanks,
Chris

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 05:18 PM
Hi Maik,
Further to this, I used your advice in my personal developer instance and it worked as expected. When I try copying like for like into our DEV instance, still no good.
Thanks,
Chris

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2021 06:01 PM
Hi Maik,
This is working as expected, thanks so much for your Workplace Client Script!
Thanks,
Chris