g_form.SetValue() not set the value on record. After record submit value is EMPTY -- Kingstone

raheem2
Kilo Explorer

I have Category, Type and Item based on these values i am getting approving manager. for getting approving manager i had custom table with same field names. Approving Manager(Ex:Alex,Pradeep,Sharma). 

by Glide Record on Custom table in onChange() client script i am getting Manager. 

Here issue is after submit the record Approving Manager filed is EMPTY. this issue is after Kingstone Upgrade. below is the sample code. 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue == '') {
return;
}

if(cat == 'Application1' && type == 'Application2'){
var appm = new GlideRecord('u_approvers');
appm.addQuery('u_category' , cat);
appm.addQuery('u_type' , type);
appm.addQuery('u_item' , item);
appm.query();
while (appm.next()){
g_form.setValue('u_approving_manager', appm.u_manager);
}
}

}

 

7 REPLIES 7

Hi ruchika Its a known issue in Kingston as per SNOW. The people has fixed it using GlideAjax. Please see below. https://community.servicenow.com/community?id=community_question&sys_id=0d19dfeddb9d13c8fc5b7a9e0f9619a0 Let me know if it helps.

Hello Ifti 

I read the post it seems that the issue is there for service portal I am facing the issus in custom application.

Also I using Ajax not glide record. 

raheem2
Kilo Explorer

Hi,

 

This issue is because of making list collector readonly by using UIPolice and onLoad Client Script.

 

After making changes it is working fine. But the issue here is it shows Add me and Unlock<<Field name>>. by using onLoad client script disabled Add me. But unable to disable Unlock<<Field name>> without changing properties.

Hide Add me in List:

document.getElementById("add_me.incident.watch_list").style.display='none';

document.getElementById("add_me_locked.incident.watch_list").style.display='none';


Need help to Hide Unlock<<Field name>> in List: