Skip to content

Commit e44cffa

Browse files
authored
Create Updating Incident
This script is useful when you want to programmatically update the short description of a specific incident in ServiceNow, especially during automation or bulk updates.
1 parent 524e423 commit e44cffa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Updating Incident

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var incidentGR = new GlideRecord('incident');
2+
3+
// Replace 'INC0010001' with the actual incident number or use a query to find it
4+
if (incidentGR.get('number', 'INC0010001')) {
5+
incidentGR.short_description = 'Updated short description for Priority 1 incident';
6+
incidentGR.update();
7+
} else {
8+
gs.info('Incident not found');
9+
}

0 commit comments

Comments
 (0)