Pass Flow Designer output to Client Script onLoad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2024 08:58 AM
Hello,
I have a simple flow designer that creates approvals on a custom table. The problem that I have is that the custom table needs to make fields non-read only when an approval has been approved. I was thinking about sending an output from the flow designer to an onLoad client script where the fields would be validated.
I cannot however come up with an idea on how to send a true/false type output from flow designer that would be available in client script.
Does in ServiceNow exist an API or any other method to call in client script outputs from Flow Designer?
I was thinking to use GlideFlow.getExecution API but was not able to get any response on client side,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2024 09:13 AM
Here is a link to some documentation that may be helpful. Using this API, it is server side, you may be able to use this to get the output needed in an onDisplay business rule to make the info available, and use an onLoad client script to retrieve the data necessary.
Here is a link to the docs and a picture of the relevant method
Also here is another link, if you choose to try to go that route, that explains how to use onDisplay BRs with client scripts using g_scratchpad.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2024 09:25 AM
@Amadeusz Sochac You can make a flow/subflow/action client callable . Please refer to https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/flow-designer/task/g... for more information.