Skip to content

Commit 959b848

Browse files
authored
Revise UI Action script instructions in README
Updated usage instructions for the UI Action script.
1 parent f421592 commit 959b848

File tree

1 file changed

+1
-20
lines changed
  • Client-Side Components/UI Actions/Cancel Flow Executions

1 file changed

+1
-20
lines changed

Client-Side Components/UI Actions/Cancel Flow Executions/README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)