Client script does not work in new ServiceNow Agent Mobile App
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2019 06:45 AM
I want to remove options from the state choice list. For example, only the "Open" option should be possible in the "New" status. All other status options should be removed. The script does not work with the new Mobile App ServiceNow Agent. How do I change the client script?
The script looks something like this:
function onLoad() {
var u_state = g_form.getValue('u_state');
if (u_state == 1 ) // Option: "New" -> u_state = 2 is Option: "Open"
{
g_form.removeOption('u_state', '3'); // Option: "Resolved"
g_form.removeOption('u_state', '4'); // Option: "Closed"
}
}
Any idea?
Thanks!
- Labels:
-
Scripting and Coding
-
Studio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2019 03:42 PM