Script error encountered?

Community Alums
Not applicable

We are getting a 'Script error encountered when changing this field - please contact your System administrator message on one of our fields in our catalog items. I have searched through the community but haven't found anything matching this.

I recreated the error in Mozilla and got the console report below. I am a newer developer so not what the errors are. Anyone have any ideas on how I can get rid of the message? It still works and pulls up the customer but is throwing the error for some reason.

find_real_file.png

2 REPLIES 2

Ivano B
ServiceNow Employee
ServiceNow Employee

Hi Kris



First of all you have to look for client scripts running against the following fields



- u_customer


- u_case_intake



The warning you are receiving on the console are caused by the scripts


It seems that they are using some specific methods usually not recommended by ServiceNow best practices.


Have a look here



http://wiki.servicenow.com/index.php?title=Client_Script_Best_Practices#gsc.tab=0




For instance you are not supposed to use sync ajax (find getXMLWait in your code) or you should also try to avoid the use of getReference


Please refer to this article for more info about async vs sync



GlideAjax - ServiceNow Wiki


Community Alums
Not applicable

That's what I was afraid of, we had a contractor build a lot of our ServiceNow stuff before my co worker and I got here. Thanks for the leads I will look in to them.