g_form.SetValue() not working in Service Portal (Kingston patch3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2018 02:22 AM
Hi Everyone,
I am using a basic g_form.setValue function for a catalog item variable.
Eg:-
function onLoad() {
//Type appropriate comment here, and begin script below
//var a = g_form.getValue('test_name');
g_form.setValue('comments',new Date());
//alert(g_form.getValue('choice'));
}
When I test the catalog item from the Service Catalog, this code is working. However, when trying to test within Service Portal, it's not able to set up the field values.
I tried hardcoding the value and even use the values of some other field, but it is not populating the field on the service portal.
Note: Our instance recently upgraded to Kingston.
Kindly suggest a solution for this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2018 02:30 AM
Hi,
Script seems to be good. Could you confirm if UI type selected is All for the Client script once.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2018 02:37 AM
Hi Jaspal,
The UI type is selected as 'Both' for the catalog client script.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2018 02:40 AM
Hi Ayushi
We have the same problem with g_form.setValue();.
This stopped working since we went on Kingston Patch2, hopefully there's a workaround.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2018 02:45 AM
Hello Rudi,
Could you let me know if you know what the workaround is.
Thanks.