Print to Execution Details Log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 09:20 AM
Ref: Solved: Can I write logs to the Execution Details record - ServiceNow Community
The reference question isn't solved as the link it points to no longer works.
I'm creating a custom action with a javascript script. I need the ability to print output to the Logs section of the Execution Details from javascript. How can I do that?
This shows how to view the log, but not how to print to it in the first place:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2023 10:26 PM
You can add to the status field of every step which will be logged there. you can access it using "outputs.status" and set the value whatever you need
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 08:31 AM
If I understand correctly, that doesn't work. In my script, I did this:
I get this repeated in Output and Step Output data:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 08:40 AM