Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ASK FOR COMMIT BEFORE LEAVING A RECORD INSTANCE.

Re: ASK FOR COMMIT BEFORE LEAVING A RECORD INSTANCE.

From: Yann Chevriaux <chevriaux_at_theleme.com>
Date: Mon, 27 Sep 1999 10:33:48 +0200
Message-ID: <37EF2BEC.8F7FE66@theleme.com>


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)



declare
  answer number;
begin

  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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US