- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 12:18 AM - edited 10-22-2025 12:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 12:26 AM
ServiceNow has provided "FlowAPI" class to call Flow/Subflow/Actions by using scriping. However, this can only be called from Server side scriping. So, when we want it to be called from Client side, we can use GlideAjax to invoke server side script which will trigger Flow/Subflow/Actions.
Let me know if you need sample script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 12:38 AM - edited 10-22-2025 12:39 AM
var inputs = {};
inputs['current'] = current; // GlideRecord of table:
inputs['table_name'] = 'incident';
// Execute the global flow called test_flow
sn_fd.FlowAPI.executeFlow('global.test_flow', inputs);
This script initializes an input object, sets the current record and table name, and then triggers a global Flow Designer flow named test_flow using the sn_fd.FlowAPI.executeFlow() method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 12:26 AM
ServiceNow has provided "FlowAPI" class to call Flow/Subflow/Actions by using scriping. However, this can only be called from Server side scriping. So, when we want it to be called from Client side, we can use GlideAjax to invoke server side script which will trigger Flow/Subflow/Actions.
Let me know if you need sample script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 12:35 AM
Yes Please script will help !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 12:38 AM - edited 10-22-2025 12:39 AM
var inputs = {};
inputs['current'] = current; // GlideRecord of table:
inputs['table_name'] = 'incident';
// Execute the global flow called test_flow
sn_fd.FlowAPI.executeFlow('global.test_flow', inputs);
This script initializes an input object, sets the current record and table name, and then triggers a global Flow Designer flow named test_flow using the sn_fd.FlowAPI.executeFlow() method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2025 02:19 AM
Thanks @Ravi Gaurav that worked for me !!