File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Server-Side Components/Background Scripts/ Bulk Change of Incident Priority Based on Category Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ Bulk Incident Priority Updater
2+ Overview
3+
4+ This ServiceNow background script automatically updates the priority of multiple incidents based on their category.
5+ It helps administrators and developers maintain consistent priority levels aligned with business rules — without manual updates.
6+
7+ Use Case
8+
9+ Here’s how it works:
10+
11+ Incidents under the Network category are set to Priority 1 (Critical)
12+
13+ Incidents under Application are set to Priority 2 (High)
14+
15+ Incidents under Hardware are set to Priority 3 (Moderate)
16+
17+ This approach saves time and ensures priority values remain standardized across the platform.
18+
19+ Script Details
20+ Field Value
21+ Table incident
22+ Type Background Script
23+ Author Sachin Narayanasamy
24+ Language JavaScript (GlideRecord)
25+ Logic Flow
26+
27+ Define a category-to-priority mapping inside the script.
28+
29+ Query all active incidents in the system.
30+
31+ For each incident:
32+
33+ Retrieve its category.
34+
35+ If the category exists in the mapping and the current priority is different, update the record.
36+
37+ Log updates for each incident with its number and new priority.
38+
39+ Display a summary showing how many incidents were updated and skipped.
You can’t perform that action at this time.
0 commit comments