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!

Exception/Message handling from a plsql process in Apex

JasOct 10 2011
Hi All,

This question has many references and many links - but I am looking for a standard process for this.

I have a situation where I want to display alerts/messages based on a plsql process when a button is clicked.

I have done it in ways like :
Way 1 :

htp.p('<script type="text/javascript">');
htp.p('var r=confirm("All sections completed - Do you want to proceed?");
if (r==true)
{
alert("Complete");
completeAudit();
}
else
{
alert("Cancelled");
}
');
htp.p('</script>');

Way 2:
Raised the messages in an exception :
owa_util.redirect_url( 'f?p='||:APP_ID||':10:'||:APP_SESSION );
apex_application.g_unrecoverable_error := true;
htp.p('<script>alert("Unable to verify record creation in Glovia.Please contact support to locate the error:'||gn_error_log_id||'"</script>');

The issue is - at certain places - 1 works and at other places 2 works and sometimes neither of them work.
I am unable to understand the functioning - and have spent loads of time to standardize the message handling from a plsql process.

Any suggestions that would make me understand the process is much appreciated.

Cheers,
Jas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2011
Added on Oct 10 2011
0 comments
527 views