We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45d65e4 commit c1f9860Copy full SHA for c1f9860
1 file changed
Server-Side Components/Business Rules/Start a Flow/script.js
@@ -0,0 +1,19 @@
1
+//Table: Change Task
2
+// When: After Delete
3
+// When any of the associated change tasks are deleted, calling the flow asynchronously to make the updates.
4
+(function executeRule(current, previous /*null when async*/ ) {
5
+ try {
6
+ var chgTask = new GlideRecord('change_task');
7
+ chgTask.addQuery('change_request', current.change_request);
8
+ chgTask.query();
9
+ if (chgTask.next()) {
10
+ var inputs = {};
11
+ inputs['current'] = chgTask;
12
+ inputs['table_name'] = 'change_task';
13
+ sn_fd.FlowAPI.getRunner().flow('global.calculateActualStartEndDates').inBackground().withInputs(inputs).run();
14
+ }
15
+ } catch (ex) {
16
+ var message = ex.getMessage();
17
+ gs.error(message);
18
19
+})(current, previous);
0 commit comments