We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06c5594 commit 13ddd26Copy full SHA for 13ddd26
Server-Side Components/Business Rules/Auto create Problem when P1 Incident created/After_BR.js
@@ -0,0 +1,18 @@
1
+function executeRule(current, previous /*null when async*/ ) {
2
+ if (current.priority == 1 && current.operation() == 'insert') {
3
+ var problemGR = new GlideRecord('problem');
4
+ problemGR.initialize();
5
+ problemGR.short_description = current.short_description;
6
+ problemGR.description = current.description;
7
+ problemGR.cmdb_ci = current.cmbi_ci;
8
+
9
+ var problemID = problemGR.insert();
10
11
+ if (problemID) {
12
+ current.problem-id = problemID;
13
+ current.update();
14
+ }
15
16
+})(current, previous);
17
18
0 commit comments