Can I use gs.info in a Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2025 06:42 AM
Can I use gs.info in a Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2025 06:56 AM
gs.log() is also a server-side API.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2025 06:59 AM
Thanks for your repaly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2025 07:02 AM
Hi ,
You can't use
gs.info in a Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2025 07:04 AM
It can be used only in server-side scripting. If you want to log the information in client script, create a script include and call it from client script
https://www.servicenow.com/community/sysadmin-forum/i-want-to-log-in-client-script/m-p/2542551
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2025 11:48 PM
Hi @kishorchika
No, you cannot use gs.info() in a Client Script in ServiceNow.
Client Scripts run in the user's browser, so they do not have access to server-side objects like gs.
If you want to log something in the browser console (for debugging), use standard JavaScript logging methods:
console.log("This is a log message");
or
You can also use info Message
g_form.addInfoMessage("This is an informational message.")
Thanks,
Vignesh Parthiban