We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bdc638 commit 55cae26Copy full SHA for 55cae26
2 files changed
Server-Side Components/Script Includes/ProblemCreation/CreateProblem.js
@@ -0,0 +1,15 @@
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);
Server-Side Components/Script Includes/ProblemCreation/README.md
@@ -0,0 +1,3 @@
+This script is a ServiceNow Business Rule that creates a Problem record whenever an Incident is created with the category "hardware".
+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.
0 commit comments