Can I still use jslog in service portal or client script from catalog, widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi @JamesZachaB ,
I think you can not use jslog in service widgets, you can use alert in client script and console.log or gs.log in server script
Also check some articles
https://www.servicenow.com/community/developer-forum/finding-jslog-in-sandiego/m-p/1640287/page/2
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
