Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ASK FOR COMMIT BEFORE LEAVING A RECORD INSTANCE.
Forms 4.5 runs a default alert message whenever you change focus, depending the
form validation unit.
By example if you specify validation unit as record an alert will be displayed
every time you navigate from a changed record to another.
I suggest you trap post-record event:
Assume you create an Alert COMMIT_ALERT with button 1 YES and button2 NO.
TRIGGER POST-RECORD: (at form level if available for any record)
if :system.record_status in ('CHANGED','INSERT')
then
answer := Show_Alert('COMMIT_ALERT');
if answer := ALERT_BUTTON2
then
raise form_trigger_failure; -- Cause navigation failure;
end if;
end if;
end;
Well, I hope this will help you.
Yann.
"Olivier Régis" a écrit :
> I WANT A DIALOG "DO YOU WANT TO COMMIT ?" (YES/NO)
> IF I ANSWER (NO), IT MUST NOT LEAVE THE CURRENT RECORD.
> I WANT THIS EVERYTIME THERE'S A CHANGE IN A RECORD AND I LEAVE A RECORD. IN
> A MASTER-DETAIL, IT MUST WORK ALSO WHEN I LEAVE A MASTER RECORD TO GO TO A
> DETAIL RECORD..
>
> WHAT'S THE SIMPLEST SOLUTION AND TRIGGERS TO USE ?
>
> THANKS FOR THE ADVICE..
>
> O.Régis
> MCSE+I, OCP
Received on Mon Sep 27 1999 - 03:33:48 CDT
![]() |
![]() |