How to use GlideFlow from a "Button clicked" event on UI Builder?

mtrojahn
Tera Contributor

Hello,

How can I solve the GuideFlow being undeclared when called via a button on UI Builder?

Here is some context:

I have a "Flow Action" with a "Rest Step" and a "Json Parser Step"  that work as intended.

I want to create a custom page with a Button component that triggers this flow.

find_real_file.png

I understand that I can create a "Page Script" and assign this script to the Button (above), but if I use "GlideFlow" inside this script, it's not defined because it is missing the import.

How can I solve this? This works flawlessly when added to a "UI Action" on an existing "Table" view, for example. I've seen some commentaries in some posts that advise adding the import to the main theme, but I haven't figured out how to do that.

Thanks for any assistance.

1 ACCEPTED SOLUTION

Muralidharan BS
Mega Sage
Mega Sage

Hi Marcelus,

You can trigger flow from UIB using server script.

1. Create a transform and add server scriplet of the flow like below.

2. Add ACL for execute 

find_real_file.png

3. Add this transform to the page

4. Add to the button event. Now, this should trigger the flow when the button is clicked. 

find_real_file.png

 

I tried using the Client Script"glideflow" but it is not working, I tried in the client script include and in the inline script but no luck.

Thanks

View solution in original post

3 REPLIES 3

Muralidharan BS
Mega Sage
Mega Sage

Hi Marcelus,

You can trigger flow from UIB using server script.

1. Create a transform and add server scriplet of the flow like below.

2. Add ACL for execute 

find_real_file.png

3. Add this transform to the page

4. Add to the button event. Now, this should trigger the flow when the button is clicked. 

find_real_file.png

 

I tried using the Client Script"glideflow" but it is not working, I tried in the client script include and in the inline script but no luck.

Thanks

Nice, thanks!! I'll give it a go and come back to this thread.

Did this work for you?