"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

Amit Verma
Kilo Patron
Kilo Patron

Hi @Dinh Nguyen 

 

Change the condition as below and retry -

current.state == 1

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi @Amit Verma ,

I tried but it still shows "Action not Authorized". I think the problem lies in the State field at the same time updating in Flow Designer and Condition of the UI Action executing.

But i don't know how to fix this. If you have any solution, please suggest me.

Thank you so much.

@Dinh Nguyen 

 

Did you created this UI action by copying it from another UI action ? If yes, check the action name field. You get this error when there is an issue with duplicate action name or condition you have placed in UI action.


Please mark this response as correct and helpful if it assisted you with your question.

Hi @Amit Verma,

My UI Action is completely new and I have checked its action name is unique, but it still gives an error.  If you have other solution, please suggest me.