Procedure Exit
623630Feb 22 2009 — edited Feb 23 2009Hi All!
I make a procedure which is in PLL Lib. Now, I am
calling this proc on a button or F3 key. This procedure works as if any
changes have to be made on the form then confirmation window would
appear. If user press Yes button then I am calling Pro_Save which exist
on the form. Now, How can I call that Pro_Save into PLL Lib?
If
I use Do_Key( 'Commit_Form' ); then after pressing Yes button form exit
without saving while some fields are required for save this record.
How could I achieve this task?
Procedure Pro_Exit Is
val Number;
Begin
-- Hide information bars
Pro_Current_Attribute( 'RED_MESSAGE_BAR', 'GREEN_MESSAGE_BAR' );
If Name_In( 'System.Form_Status' ) = 'CHANGED' Then
val := Func_Get_Alert( 'SAVE_ALERT', 'Confirm!', 'The record status
has been changed.' || Chr( 13 ) || Chr( 13 ) || 'Do you want to save
the changes?' );
If val = Alert_Button1 Then
Do_Key( 'Pro_Save' ); --Pro_Save;
Exit_Form( No_Validate, No_Commit );
ElsIf val = Alert_Button2 Then
Exit_Form( No_Validate, No_Commit );
End If;
ElsIf Name_In( 'System.Form_Status' ) <> 'CHANGED' Then
Exit_Form( No_Validate, No_Commit );
End If;
End;
Edited by: Waqas Attari on Feb 22, 2009 8:40 PM