Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to use console.log() in client script while creating a UI page

T17Bhawna
Tera Contributor

While creating a new UI page to test out the GlideAjax API, I was trying to add console.log() method to the callback method in the Client Script. But, it is not allowing me to do so and keeps popping up as a problem. 

T17Bhawna_0-1745697685099.png

Kindly provide a solution of what is the other way to do the same. I'm currently using ServiceNow Xanadu instance.

Thank you.

1 ACCEPTED SOLUTION

J Siva
Kilo Patron
Kilo Patron

Hi @T17Bhawna 
It's just a warning. You can ignore that, it'll work.
Regards,
Siva

View solution in original post

2 REPLIES 2

J Siva
Kilo Patron
Kilo Patron

Hi @T17Bhawna 
It's just a warning. You can ignore that, it'll work.
Regards,
Siva

Radim Ceresnak
Tera Contributor

Try jslog() instead as it is recommended in the Best Practises.

//  generic JavaScript logging
console.log('Response payload: ' + response);

// ServiceNow client side JavaScript logging
jslog('Response payload: ' + response);