What is console.log() in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 01:28 AM
Hi,
How to use console.log() in ServiceNow and how to check?
Thanks and Regards,
RamaRao

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 01:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 01:41 AM
Hi,
Thanks for the quick response. Once apply the console.log in the script, How do I check?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 01:34 AM
Hi rama rao
There are multiple different debugging logs available in servicenow for client side and server side scripts. console.log() can be used on client side script only. in addition we have JSLOG(), alerts etc.
Check below links
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 01:36 AM
Hi Rama,
console.log() is a javascript method used to add add log messages to the console of a browser. It can be used in Widget scripts etc.
How to check for the console logs
1. click -> Ctrl+Shift+I in chrome browser. This opens up the console and messages gets displayed as highlighted when the script runs