- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 12:59 AM
In business rule I write script. where can show the message with "gs.info"?
if(current.name){
gs.info('Name: '+ gs.getUser().getName());
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 01:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 01:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 01:12 AM
Hi,
gs.info() statements are shown in system logs
Easy way to find that Script log statements in left nav
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 01:18 AM
Hi Ben,
As comments are already stating where it can be located just to get you understand the different it is as below.
gs.log() - In Logs
gs.info() - In Logs (mostly used for Scoped applications for logging as gs.log() does not work for scoped app)
gs.addInfoMessage() - On the form header in normal blue/green color
gs.addErrorMessage() - On the form header in red color
gs.print() - Mostly in background scripts for logging

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2020 01:29 AM
Hello Ben
Is the script include in a scoped application If it is, then gs.log does not work and you should be using gs.info or gs.debug instead.
You can send messages to customers as alerts, informative messages, or error messages.
1)current.field_name.setError("Hello World"); :-Will put "Hello World" below the specified field.
2)gs.addInfoMessage("Hello World"); :- Will put "Hello World" on the top of the screen.
3)gs.print("Hello World"); :-Will write to the text log on the file system but not to the sys_log table in the database.
4)gs.log("Hello World"); :-Will write to the Database and the log file.
What is System Log:-The System Logs module provides a variety of logs that you can use to troubleshoot and debug transactions and events that take place within the instance.
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat
Is the script include in a scoped application If it is, then gs.log does not work and you should be using gs.info or gs.debug instead.
You can send messages to customers as alerts, informative messages, or error messages.
1)current.field_name.setError("Hello World"); :-Will put "Hello World" below the specified field.
2)gs.addInfoMessage("Hello World"); :- Will put "Hello World" on the top of the screen.
3)gs.print("Hello World"); :-Will write to the text log on the file system but not to the sys_log table in the database.
4)gs.log("Hello World"); :-Will write to the Database and the log file.
https://docs.servicenow.com/bundle/orlando-application-development/page/script/general-scripting/ref...
What is System Log:-The System Logs module provides a variety of logs that you can use to troubleshoot and debug transactions and events that take place within the instance.
https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/system-logs/conce...
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat