Redirect to URL

Redirect to another page within APEX, or to a new URL, using PLSQL.

The code may be useful in a before header process.

apex_application.g_unrecoverable_error ensures that any further rendering of the page, or processing on that page, stops.

 owa_util.redirect_url('f?p=' || v('APP_ID') || ':HOME:' || v('SESSION'));
 apex_application.g_unrecoverable_errorĀ := true;

An alternative way to stop processing is to use


The preferred way of doing this is now using APEX_UTIL.REDIRECT_URL

APEX_UTIL.REDIRECT_URL('f?p=' || v('APP_ID') || ':HOME:' || v('SESSION'));

One thought on “Redirect to URL”

  1. I’m in apex 4.0 and owa_util.redirect_url works fine. My issue is, I can’t get it to open my external page (cnn) in a popup window. With APEX it’s all about timing and location of code which most “solutions” gloss over.
    I have a button, and I run an after submit pl/sql process:
    apex_application.g_unrecoverable_error:= true;

    All works well (in same window). If I start introducing solutions like javascript or tags they ALL fail.
    owa_util.redirect_url(‘javascript:popUp( ”” )’); — Does nothing
    htp.p(”); — Works but no popup, same page, and hard to get back.

    Feel like I’m missing something easy, but with “zero html, javascript” knowledge tough to find solution.

Leave a Reply

Your email address will not be published. Required fields are marked *