Search code examples
oracle-databaseplsqloracle-apexoracle-apex-5

Oracle Apex 5: How do I redirect page when (dynami-action)button clicked?


I have a dilemna. I want to redirect the APP_USER to another page when a button is clicked. The thing is the button has a dynamic action with PLSQL body. The PLSQL does a few checks and validations and then redirects the individual to another page. How would I do that? Many thanks.


Solution

  • I suggest you use Branches because they are easier and better from a security point of view.

    On your page create a button that will submit the page (has attribute Action=Submit Page) then create a Branch at the Processing point where you will select the page that you want the user to be redirected to.

    Now to make this branch run just in some conditions go to the Condition attribute of the branch and at When Button Pressed select your button and at Type select PLSQL Function Body and add your logic there or select some other type that suits you best.