Skip to main content

Posts

Showing posts from March, 2026

ServiceNow Executing a Flow Action via Script (Async and Sync)

 ServiceNow Executing a Flow Action via Script (Async and Sync) method 1 var result = sn_fd. FlowAPI .startFlow(flowName, inputs); method 2 Diff between asynch v synch   //-- Start Asynchronously: Uncomment to run in background. Code snippet will not have access to outputs.                   //-- sn_fd.FlowAPI.getRunner().action('global.glidepath__create_sso'). inBackground ().withInputs(inputs).run();                     //-- Execute Synchronously: Run in foreground. Code snippet has access to outputs. var inputs = {};                   var   result = sn_fd. FlowAPI .getRunner().action( 'global.glidepath__create_action' ). inForeground ().withInputs(inputs).run();           ...