Client Script Error

rutujalande
Tera Contributor

I am getting below error when submitting the catalog item request on the RITM Page on the requested for field.

 

onChange script error: TypeError: Cannot read properties of undefined (reading 'process') function(control, oldValue, newValue, isLoading) { window.CatalogDynamicValue.process(control, oldValue, newValue, isLoading, '130185880fa17500dcc800dce1050e09', '["d9646b46db5fc25085397856f3961964"]', false); }

4 REPLIES 4

Aditya_hublikar
Mega Sage

Hello @rutujalande ,

 

Can you please share catalog client script record screenshot and script snippet . Then get exact idea whats wrong here . 

Sure, here is the screenshot attached.

Hello @rutujalande ,

 

May be there is some issue in getRefference method , you can use getRefference with callback and then call it .

g_form.getReference('requested_for', function(gRef) {

if (!gRef)
return;

var ga = new GlideAjax('checkUserRecAJAX');
ga.addParam('sysparm_name', 'checkUserMgrStatus');
ga.addParam('sysparm_userSysID', newValue);

ga.getXMLAnswer(function(answer) {

if (answer.toString() == 'true') {

g_form.clearValue('manager');

} else {

g_form.setValue('manager', gRef.manager);

}

});

 

And also change Ui type to all so it will runs on native plus portal view . I also saw that error is on RITM record are you changing variable on ritm record , if yes then also check applies on requested item checkbox .

 

If this helps you then mark it as helpful and accept a solution.

Regards,

Aditya

Bhavya11
Kilo Patron

Hi @rutujalande ,

 

This issue occurs when one of your onChange client scripts is unable to read a field on the form. Please check which onChange client script is causing the problem.

In that script, verify whether there are any fields that the script cannot access, possibly because the fields are not available on the form.

You can refer to the following support article for a similar issue:

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0856441

If this information proves useful, kindly mark it as helpful or accepted solution.

Thanks,
BK