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 0ee4c26 commit 46c7c39Copy full SHA for 46c7c39
Client-Side Components/UI Actions/Cancel Flow Executions/cancelFlow.js
@@ -0,0 +1,16 @@
1
+function cancelRunningFlows() {
2
+
3
+ try {
4
+ var grFlowExecution = new GlideRecord("sys_flow_context");
5
+ grFlowExecution.addQuery("source_record", current.sys_id);
6
+ grFlowExecution.query();
7
8
+ while (grFlowExecution.next()) {
9
+ sn_fd.FlowAPI.cancel(grFlowExecution.getUniqueValue(), "Canceling Flows");
10
+ }
11
+ } catch (error) {
12
+ gs.error("Error cancelling flows: " + error.message);
13
14
+}
15
16
0 commit comments