- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2019 12:09 AM
Most of the client scripts which are working in normal default view of forms aren't working in Agent Workspace.
For example - the below script is not working. How can we ensure all client scripts work fine in AW?
function onLoad()
{
var isAdmin = g_user.hasRole('admin');
var state = g_form.getValue('state');
if (!isAdmin )
{
if(state != 3){
g_form.removeOption('state', '3');
}
}
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2019 11:50 PM
|
'g_user.getUserID()' is not supported in Agent workspace or service portal but does in the normal SN platform as some APIs are only supported in Desktop UI(platform). |
You can also refer to this doc for all the supported APIs : |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2019 12:15 AM
make sure ui type set as all. please validate this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2019 12:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2019 11:48 PM
That didn't work Harsh..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2019 11:48 PM
|
'g_user.getUserID()' is not supported in Agent workspace or service portal but does in the normal SN platform as some APIs are only supported in Desktop UI(platform). |
You can also refer to this doc for all the supported APIs : |