
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Did you know that you could trigger a subfow from a UI action and get a response back without having the page reload?
Most of you probably realize that you can trigger a Flow or Subflow using a script. If you look at Developers site it looks like this:
////where current is a task record with a workflow context
var w = new Workflow();
var context = w.startFlow(id, current, current.operation(), getVars());
You can build this code more quickly by clicking the three dots and selecting Create code snippet.
A window will appear, as shown below, displaying the snippet with your inputs and the correct formatting. The snippet is divided into a Server side and a Client-side.
Do note that client side will require an ACL of type client_callable_flow_object. That requires security_admin access to create the ACL.
Just like the server code, there are inputs and outputs but, on the client-side you can do a cool trick with the outputs.
So what’s the cool trick? If you set-up the ACL, copy this code into a UI Action, and pass in your input data (in this example application_name, short_description, and template_source_app) in the UI action and then add a gs.info(outputs) – you see the results from the flow at the top of your page without reloading the page!
Happy if someone tries this and provides some feedback!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.