extract log file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 06:19 AM
Hi All,
For analyzing purpose, I need to have an extraction of the ServiceNow log files that contain this information
- Ticket Nr
- Ticket state
- Company
- channel
- Resolution group
- Impact
- Urgency
- Priority
- Service
- Service offering
- caller
that the system write each time that an update occurs on the tickets (incident or Service Request)
How can do that ?
thanks
Luca

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 06:53 AM
I am assuming you are having a custom table to keep these logs. Now in order to add logs to this table, you need to create an onBefore, update business rule for Incident and Service Request tables. When ever the updates happen on any of these tables, the business rule will get called and inside the business rule script field, you can create GlideRecord object of your custom log table, set the values of the individual fields from the source record (e.g. incident or service request) and do a glideRecord.insert() to insert that record in the custom log table.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 07:07 AM
Hi Sandeep,
Is ti possible to extract these data from an existing table/view ?
I haven't a custom table
thanks
Luca

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2023 08:16 AM
@Luca3 you would need a custom table to write these logs. Otherwise, where would you keep these logs when an incident or service request is updated.