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 92c898d commit 8d866bdCopy full SHA for 8d866bd
Server-Side Components/Business Rules/updating problem records/updating_problem_record.js
@@ -0,0 +1,12 @@
1
+(function executeRule(current, previous) {
2
+ // Check if the state changed to "In Progress"
3
+ if (current.state.changesTo(2)) { // Assuming 2 is the value for "In Progress"
4
+ var grProblem = new GlideRecord('problem');
5
+ grProblem.addQuery('incident', current.sys_id);
6
+ grProblem.query();
7
+ while (grProblem.next()) {
8
+ grProblem.state = 2; // Assuming 2 is the value for "Work in Progress"
9
+ grProblem.update();
10
+ }
11
12
+})(current, previous);
0 commit comments