- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 04:32 AM
Hi,
We are trying to trigger both On boarding and detailed assessments from business service form once it is created and we provide this flexibility through a UI actions (buttons). We configured triggers and actions in flow designer.
But is there anyway to call a flow in UI action script?
Urgent help is required.
Solved! Go to Solution.
- Labels:
-
Vendor Risk Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2019 08:09 AM
Use below code in the UI action
try {
var flowInputs = {};
flowInputs['current'] = current;
flowInputs['table_name'] = current.getTableName();
var result = sn_fd.Flow.startAsync('SCOPENAME.FLOWNAME', flowInputs);
//The Sys ID of a flow execution (contextId)
var contextId = result.contextId;
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 11:23 AM
HI,
Flow designer can be triggered on update of record, you can create a true/false field(hidden) and on UI action click just make current.field_name = true; current.update();
This will update the record and then make flow designer to run only if that field is true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2019 10:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2019 02:27 AM
Hi,
Starting with NewYork release, you should be able to call a flow from UI action using the new APIs: FlowAPI or GlideFlow, depending if you want to execute on server or client side.
More here: https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/administer/flow-designer/concept/api-access-flow-designer.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2019 09:52 AM
Hello there,
Just checking if you got your question answered.
Thank you 😊
EF