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.

Can I still use jslog in service portal or client script from catalog, widget?

JamesZachaB
Tera Contributor

Hello I notice that when I use jslog in catalog client script it throws an error
"Error while running Client Script Reference error: jslog is not defined"

2 REPLIES 2

Vishal_Jaiswal
Mega Guru

Hi @JamesZachaB ,

You cannot use jslog() in the Service Portal, Service Portal Widgets, or Mobile interfaces.

The error ReferenceError: jslog is not defined occurs because jslog() is a legacy function built specifically for the Classic (Backend/Native) UI.

It relies on the "JavaScript Log" window found in the main ServiceNow frame, which does not exist in the Service Portal environment.

 

Regards,

Vishal