***EDIT***
Figured this out for my case.
APEX_UTIL.REDIRECT_URL did not want to work from a dynamic action PL/SQL block. But when i moved the code into a process which is triggered after page submit, then it worked.
Will leave this question open for a while in case someone else has any other useful input.
*******
Hi
I'm facing the below error when trying to use APEX_UTIL.REDIRECT_URL, please assist.
I've written a small PL/SQL dynamic action that gets triggered when a button is clicked:
declare
w_url varchar2(200);
BEGIN
w_url := 'f?p='||:APP_ID||':HOME:'||:APP_SESSION;
apex_debug.message('w_url: '||w_url);
APEX_UTIL.REDIRECT_URL (p_url=>w_url);
END;
When i click my button i get this message:

debug messages:
|
Run NATIVE/PLUGIN= request
| 4 |
| 0.02058 | 0.00204 |
SQL Statement prepared: line count=1, first index=1, last index=1, characters=185, found binds=2
| 4 |
| 0.02262 | 0.00053 |
w_url: f?p=141:HOME:3525350895620
| 4 |
| 0.02315 | 0.00363 |
Stop APEX Engine detected
| 4 |
| 0.02678 | 0.00005 |
Error: Ajax call returned server error ORA-20876: Stop APEX Engine for Execute PL/SQL Code.
| 1 |
| 0.02682 | 0.00004 |
- is_internal_error: true
| 4 |
| 0.02686 | 0.00003 |
- apex_error_code: APEX.AJAX_SERVER_ERROR
| 4 |
| 0.02689 | 0.00003 |
- ora_sqlcode: -20876
| 4 |
| 0.02692 | 0.00003 |
- ora_sqlerrm: ORA-20876: Stop APEX Engine
| 4 |
| 0.02696 | 0.00003 |
- error_backtrace: ORA-06512: at "APEX_180100.WWV_FLOW", line 2446 ORA-06512: at "APEX_180100.WWV_FLOW_RESPONSE", line 483 ORA-06512: at "APEX_180100.WWV_FLOW_UTILITIES", line 5876 ORA-06512: at "APEX_180100.HTMLDB_UTIL", line 2947 ORA-06512: at line 6 ORA-06512: at "SYS.DBMS_SQL", line 1707 ORA-06512: at "APEX_180100.WWV_FLOW_DYNAMIC_EXEC", line 2360 ORA-06512: at "APEX_180100.WWV_FLOW_DYNAMIC_EXEC", line 1406 ORA-06512: at "APEX_180100.WWV_FLOW_PLUGIN_UTIL", line 2975 ORA-06512: at "APEX_180100.WWV_FLOW_DYNAMIC_ACTION_NATIVE", line 474
| 4 |
| 0.02699 | 0.00003 |
- error_statement: begin declare w_url varchar2(200); BEGIN w_url := 'f?p='||:APP_ID||':HOME:'||:APP_SESSION; apex_debug.message('w_url: '||w_url); APEX_UTIL.REDIRECT_URL (p_url=>w_url); END; end;
| 4 |
| 0.02702 | 0.00042 |
- component: APEX_APPLICATION_PAGE_DA_ACTS NATIVE_EXECUTE_PLSQL_CODE (16693125655165531)
| 4 |
| 0.02744 | 0.00010 |
Stop APEX Engine detected
| 4 |
| 0.02754 | - |
Final commit
|