Skip to content

Commit 2931511

Browse files
Create Readme.md
1 parent 313765d commit 2931511

File tree

1 file changed

+24
-0
lines changed
  • Server-Side Components/Background Scripts/Convert Incident Records to JSON

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Convert Active Incidents to JSON – ServiceNow
2+
Overview
3+
4+
This script fetches all active Incident records from your ServiceNow instance and converts them into a JSON format. The JSON output is easy to read and can be used for reporting, integration, or debugging purposes.
5+
6+
By converting records to JSON, you can quickly share structured data with external systems, automate processes, or use it in scripts and dashboards.
7+
8+
Features
9+
10+
Retrieves all active incidents from the incident table.
11+
12+
Dynamically extracts selected fields (configurable).
13+
14+
Automatically resolves reference fields to display values.
15+
16+
Adds human-readable state labels (e.g., "New", "In Progress", "Resolved").
17+
18+
Outputs pretty-printed JSON for easy readability.
19+
20+
Configuration
21+
22+
Table Name: Set the tableName variable to the table you want to extract records from.
23+
24+
Fields to Include: Update the fieldsToInclude array to include the fields you need in the JSON. For example:

0 commit comments

Comments
 (0)