Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle Apex alert message from PL/SQL

User_7IBR1Jun 29 2022

Hi, I want to show alert message (popup message) when PL/SQL function returns N value. Now my PL/SQL code looks like this. I'm getting error in right corner, now I want to be popup message. Thanks.

declare
x varchar2(1);
e_error exception;
BEGIN
x:=new_doc_admin.ZAH_READ_PCK.RightToEntery(:APP_USER,:P11_OSB_JMB);
IF x ='N' THEN
apex_util.set_session_state('P11_ERROR_MSG', 'No rights !');
raise e_error;
END IF;
END;

Comments

Billy Verreynne

Do not raise an error, and simply pass the error message to the relevant page item.
Use the run Javascript dynamic action feature to run after the PL/SQL process, check if the error page item has a value and if so, use apex-message-namespace to display it.

1 - 1

Post Details

Added on Jun 29 2022
1 comment
12,592 views