Frm-41009 function key not allowed ,press ctrl+k for list of valid values [message #425130] |
Wed, 07 October 2009 12:22  |
consultant19
Messages: 23 Registered: September 2009 Location: India
|
Junior Member |
|
|
Hi All,
I have a custom form which has cancel button in it .
when i click on cancel it should ask
Do you want to save pending changes
yes ,no,cancel buttons
if yes button is pressed it save changes for the form.
if no form should be closed
but when i click on NO button it is giving me error
Frm-41009 function key not allowed ,press ctrl+k for list of valid values
code in cancel button is
DECLARE
l_button INTEGER;
BEGIN
fnd_message.set_string('Do you want to save pending changes?');
l_button_selection := fnd_message.question('Yes', 'No','Cancel', 1, 2,'question');
IF l_button_selection = 1 THEN
DO_KEY('COMMIT_FORM');
ELSIF l_button_selection = 2 THEN
DO_KEY('CLOSE_FORM');
ELSE
NULL;
END IF;
END;
[EDITED by LF: formatted code and applied [code] tags]
[Updated on: Wed, 07 October 2009 13:16] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Frm-41009 function key not allowed ,press ctrl+k for list of valid values [message #425355 is a reply to message #425151] |
Thu, 08 October 2009 13:05  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I don't know Oracle Applications, so I don't know anything about the suggestion you've mentioned. Sorry.
If you EXIT_FORM in the button trigger, you don't need KEY-EXIT trigger. This trigger is used if you want to do something "special" while exiting the form.
This is what I have had on mind:DECLARE
l_button INTEGER;
BEGIN
fnd_message.set_string('Do you want to save pending changes?');
l_button_selection := fnd_message.question('Yes', 'No','Cancel', 1, 2,'question');
IF l_button_selection = 1 THEN
commit;
ELSIF l_button_selection = 2 THEN
exit_form;
ELSE
NULL;
END IF;
END;
|
|
|