Cannot use screen action within the same screen

Cannot use screen action within the same screen



Why we can't use screen action within same screen in web ?

Thanks in advance.


Can you detail what your are trying to achieve?

The goal of screen actions is to react to some action on your screen like a button click or an onchange of a input.

Ana Reis

Hi tBt,

for example  if you have screen action as 'Save', you cannot use that for two different buttons? Is that your question?

Please provide more details.

It is a conceptual decision.

Like Ana said, the purpose of a screen action is to provide a response to an user action in the user interface (web screen), like pressing a button, clicking a link, changing the selection on a combo box, etc.

In any case, while you can't call a screen action from within another screen action, you can call the same screen action from more than one place in the screen.

If you need to re-use logic, you can implement it in a Server Action and than call it from within one or more screen actions.

If it seems you need to call a screen action from another one, you should review your logic and user interface.



Here is the example :

I want to add Screen Action CalcDiscount into BuatInvoice Action, but it can't.

Instead, I need to make a screen action in Server Action to accomplish that.


Yes. You have to use a Server Action to implement this.


Yes, that is correct.

You cannot call a screen action inside an other screen action. But you can isolate the logic you want to reuse in a server action and than call it on both screen actions. That is the common practice for these scenarios.

Ana Reis

Ic, ok thank you for the information :)

This Forge component can help tBt...