Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2026 10:30 AM
Hello @Balaram7 ,
I can see your script can you please try add alert method
e.g.
alert(answer) : check what it's returning
and instead of using newValue in second parameter use g_form.getValue('your field backendName');
and this one also try to make it in alert('');
unction onChange(control, oldValue, newValue, isLoading) {
if (isLoading || !newValue){
return ;
}
// here you can use g_form.getValue('your field backend name');
var a=g_form.getValue('field Name');
alert(a); // check what is coming
// here you can use g_form.getValue('your field backend name');
var a=g_form.getValue('field Name');
alert(a); // check what is coming
var ga = new GlideAjax('CheckTrustedpartner');
ga.addParam('sysparam_name','check');
ga.addParam('sysparam_ids',newValue);
ga.getXML(function(response){
var answer = response.responseXML.documentElement.getAttribute("answer");
g_form.setValue('trusted_partner',answer == 'true');
// try this
alert(answer);
g_form.setValue('trusted_partner',answer);
// try this
alert(answer);
g_form.setValue('trusted_partner',answer);
});
}
If my response helped mark as helpful and accept the solution.
Regards,
Akash
If my response helped mark as helpful and accept the solution.
Regards,
Akash