- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2025 09:01 PM
i have an ui action button in my workspace when i click on that it is activating after some delay in the work space how can i remove that delay
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2025 10:14 PM
the delay is because of this line, in this line you are calling subflow and using inForeground() so it will wait till the time subflow completes and then the next line will execute
I believe you want it to run in foreground because based on response you are doing something.
var flow_result = sn_fd.FlowAPI.getRunner().subflow('x_simet_cmdb.deactivate_sims').inForeground().withInputs(inputs).run();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2025 10:17 PM
so the delay is common we cannot remove that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2025 10:21 PM
the delay will depend on how quick your subflow runs.
If you don't want to wait for subflow output you can use background function "inBackground"
var flow_result = sn_fd.FlowAPI.getRunner().subflow('x_simet_cmdb.deactivate_sims').inBackground().withInputs(inputs).run();
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader