We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f54136 commit 1709f31Copy full SHA for 1709f31
Server-Side Components/Business Rules/Update Related Tasks When Parent Changes/script.js
@@ -0,0 +1,12 @@
1
+(function executeRule(current, previous) {
2
+ //when the priority field changes
3
+ if (current.priority.changes()) {
4
+ var task = new GlideRecord('change_task');
5
+ task.addQuery('change_request', current.sys_id);//Find all tasks related to this Change Request
6
+ task.query();
7
+ while (task.next()) {
8
+ task.priority = current.priority; //Update the task priority
9
+ task.update();
10
+ }
11
12
+})(current, previous);
0 commit comments