I have a form with button cancel to go back to report page. When the user press cancel, I have to update a value in database and redirect to the report page.
So, I made dynamic action on my button with click event. For true action, I execute PL/SQL code:
UPDATE TBL_ASSIGNMENTS SET UNLOCKED_BY=:APP_USER WHERE SRA_ID=:P7_SG_SRA_ID;
apex_debug.message('SRA_ID: %s', :P7_SG_SRA_ID);
APEX_UTIL.REDIRECT_URL('f?p=' || :APP_ID || ':5:' || :APP_SESSION);
The data in database is updated. But then the application giving me error:
AJAX call returned server error ora-20876: Stop APEX Engine for Execute PL/SQL Code
I have searched a little and it seems this issue is bug in APEX 4.2.3 AJAX call returned server error ORA-20876: Stop APEX Engine for chart5. but i don't know in APEX 5.
Do I make any mistake here? If it is really a bug, what is the best possible way to update database and redirect page using cancel button without submitting it?
Thank you.