Form Save related Query [message #563224] |
Fri, 10 August 2012 02:45 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/47b80b430c4789174c48eab596f0e9df?s=64&d=mm&r=g) |
JAYATIRC
Messages: 1 Registered: July 2012
|
Junior Member |
|
|
I have created a form where the main canvas has number of buttons. When I click each button it will open a new canvas in a new window. User will enter some details there. now I want to force the user to save or discard the record before they leave that child window. The code I have written is
DECLARE
n_button_selection INTEGER;
BEGIN
IF :SYSTEM.BLOCK_STATUS = 'CHANGED' then
fnd_message.set_string('Do you want to save the changes on Post Block?');
n_button_selection := fnd_message.question('Yes', 'No','Cancel', 1, 2,'question');
IF n_button_selection = 1 THEN
standard.commit; --commit_form;-- APP_STANDARD.EVENT('KEY-COMMIT');
ELSIF n_button_selection = 2 THEN
RAISE form_trigger_failure;
ELSE
null;
END IF;
end if;
END;
But I am not sure in which trigger I need to write the code. When I am writting in post block it is behavior is becoming unpredictable and also APP_STANDARD.EVENT('KEY-COMMIT') does not work in post_block trigger. When I am writting this in ON close trigger then also it is not firing as expected. please help me.
|
|
|
|