How can I print out a message in the system log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2021 02:28 AM
Hi all, Im new to ServiceNow I would like some help with:
How can I print out a message in the system log?
The workflow assigned to this catalogue item should print out a log in the system logs to say "User <name of the user> has ordered more <RAM or CPU> for server <server name>". The same message should be written also in the Work Notes field of the Requested Item. Set the
state of the RITM to Closed complete after writing the messages in the previous step.
Many thanks!
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2021 06:57 AM
Hi,
it should show unless you created that in another scope
Regards
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
‎04-02-2021 07:17 AM
And how do i what scope i am in ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2021 08:20 AM
Hi,
I would suggest to go through On-Demand Admin course which would give you an idea on most of the components.
Regards
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
‎04-02-2021 03:42 AM
Hi med,
You have to use gs.info to print log messages.
Var data= 'user'+ current.request.requested_for.name + 'has ordered more' + current.variables.resources + 'for the server' current.variables.var_a;
gs.info(data);
Thanks,
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2021 04:19 AM
Hi
In what kind of script do I have to put this code?
Thank you for your assistant Murthy