File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Server-Side Components/Script Includes/ProblemCreation Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ ( function executeRule ( current , previous /*null when async*/ ) {
3+
4+ // Add your code here
5+ if ( current . category == 'hardware' ) {
6+ var gr = new GlideRecord ( 'problem' ) ;
7+ gr . initialize ( ) ;
8+ gr . short_description = current . short_description ;
9+ gr . category = current . category ;
10+ gr . impact = current . impact ;
11+ gr . urgency = current . urgency ;
12+ gr . insert ( ) ;
13+
14+ }
15+ } ) ( current , previous ) ;
Original file line number Diff line number Diff line change 1+ This script is a ServiceNow Business Rule that creates a Problem record whenever an Incident is created with the category "hardware".
2+
3+ Note: Not every hardware-related incident requires a problem record — this script is just an example to show how such automation can be set up.
You can’t perform that action at this time.
0 commit comments