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!

redirect with notification before header

COct 26 2009 — edited Oct 26 2009
I have a report pages which have "edit" buttons which direct to the URL for the modify APEX page with the important information such as primary keys. If the data changes (i.e. a record was deleted) underneath the user and the user clicks "edit", the user gets the "ugly" message:

ORA-01403: no data found
<stop sign> Error Unable to fetch row.
OK

It occurs due to the before header process to fetch row. I could put additional regions to inform the user and conditions to show/execute the page differently. But I was hoping to do was to redirect the user back to the report page and have a notification message explaining the data changed and this is the current data.

I have a process before the fetch row process that checks if the data is there. If the data does not exist, then owa_util.redirect_url() redirects back to the report page. However, I have been unsuccessful in displaying a notification message. I've tried setting g_notification, g_print_success_message as well as putting the success info in the URL redirect. However, I have been unsuccessful in creating a notification. Below is the before header process:
declare 
cnt PLS_INTEGER;

begin
select count(*) into cnt
from board 
where board_id=:P220_BOARD_ID;

if cnt != 1 then
  apex_application.g_notification :='Data Changed';
  owa_util.redirect_url('f?p=&APP_ID.:200:&APP_SESSION.::NO:220:::&success_msg=changed data');
  apex_application.g_unrecoverable_error:=true;
end if;
end;
Any thoughts would be greatly appreciated. Thank you.
-Carmine
This post has been answered by 438381 on Oct 26 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2009
Added on Oct 26 2009
2 comments
1,074 views