File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Server-Side Components/Background Scripts/Incident Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ // This script can be used in a Script Include or Business Rule
2+ var incidentGR = new GlideRecord ( 'incident' ) ;
3+ incidentGR . initialize ( ) ;
4+
5+ incidentGR . short_description = 'Critical Incident - Immediate Attention Required' ;
6+ incidentGR . description = 'This is a Priority 1 incident created via script.' ;
7+ incidentGR . priority = 1 ; // Priority 1
8+ incidentGR . impact = 1 ; // High impact
9+ incidentGR . urgency = 1 ; // High urgency
10+ incidentGR . caller_id = gs . getUserID ( ) ; // Sets the current user as the caller
11+ incidentGR . category = 'network' ; // Example category
12+
13+ // Insert the new record into the database
14+ var newIncidentID = incidentGR . insert ( ) ;
15+ gs . info ( 'New Incident created with ID: ' + newIncidentID ) ;
You can’t perform that action at this time.
0 commit comments