File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed
Client-Side Components/UI Actions/Cancel Flow Executions Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -24,27 +24,8 @@ The CancelFlow UI Action provides the following capabilities:
2424
2525### UI Action Script
2626
27- Add the following script to your ServiceNow instance as a UI Action:
27+ Add the given script to your UI Action:
2828
29- ``` javascript
30-
31- function cancelRunningFlows () {
32-
33- try {
34- var grFlowExecution = new GlideRecord (" sys_flow_context" );
35- grFlowExecution .addQuery (" source_record" , current .sys_id );
36- grFlowExecution .query ();
37-
38- while (grFlowExecution .next ()) {
39- sn_fd .FlowAPI .cancel (grFlowExecution .getUniqueValue (), " Canceling Flows" );
40- }
41- } catch (error) {
42- gs .error (" Error cancelling flows: " + error .message );
43- }
44- }
45-
46-
47- ```
4829
4930### Example Usage
5031
You can’t perform that action at this time.
0 commit comments