"Action not Authorized" info message when click UI Action call a Sub-Flow

Dinh Nguyen
Kilo Sage

Hello everyone, 

I have an issue displaying the info message "Action not Authorized" when clicking an UI Action and this UI Action calls a sub-flow. In the sub-flow there is update the value of the field "State". If the condition of UI Action check field "State", it will get an "Action not Authorized" error.

Can someone please help me to fix this problem.

Thank you so much.

My UI Action configure:

DinhNguyen_0-1728460991758.png

Script Include for call Sub-Flow:

DinhNguyen_1-1728461111592.png

Sub-Flow configure:

DinhNguyen_2-1728461157265.png

 

1 ACCEPTED SOLUTION

Daniel Borkowi1
Mega Sage

 @Dinh Nguyen  I found the root cause. The issue is really your condition. That's why:

  • A client UI Action is called 2 times when using gsftSubmit and each time the condition is evaluated.

DanielBorkowi1_1-1728482223433.png

 

 

You have now three options: 

  1. Make this UI Action to a Server side UI Action (client false, no use of gsftSubmit, Script Include not Client Callable)
  2. Don't set State in your flow you can do this finally within your function  runServerSideCode within UI Action with current.state = 2;
  3. Remove gsftSubmit and all from line 14 following. Replace Line 9 with action.setRedirectUrl(current); See screenshot:

 DanielBorkowi1_2-1728482583503.png

 

 
Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Daniel Borkowi1
Mega Sage

 @Dinh Nguyen  I found the root cause. The issue is really your condition. That's why:

  • A client UI Action is called 2 times when using gsftSubmit and each time the condition is evaluated.

DanielBorkowi1_1-1728482223433.png

 

 

You have now three options: 

  1. Make this UI Action to a Server side UI Action (client false, no use of gsftSubmit, Script Include not Client Callable)
  2. Don't set State in your flow you can do this finally within your function  runServerSideCode within UI Action with current.state = 2;
  3. Remove gsftSubmit and all from line 14 following. Replace Line 9 with action.setRedirectUrl(current); See screenshot:

 DanielBorkowi1_2-1728482583503.png

 

 
Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!