g_form.SetValue() not working in Service Portal (Kingston patch3)

Ayushi Agarwal
Kilo Contributor

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.

17 REPLIES 17

Jaspal Singh
Mega Patron
Mega Patron

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.

Ayushi Agarwal
Kilo Contributor

Hi Jaspal,

The UI type is selected as 'Both' for the catalog client script.

 

Thanks.

Rudi2
Giga Guru

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

 

Ayushi Agarwal
Kilo Contributor

Hello Rudi,

 

Could you let me know if you know what the workaround is.

 

Thanks.