Wanted to achieve the functionality, when user opens a form save point should be saved and later he will do some changes (only updates) later he has to click my custom button. If user forgot to click and he tries to close then wanted to show an alert message do u want to save the changes, if yes commit , if no rollback all the changes whatever he made.
I have written as below, but it is not working..
FND_MESSAGE.SET_STRING (' Do you want to Confirm Hub Receipt?');
n_button_selection := fnd_message.question (button1 => 'Yes',
button2 => 'No',
button3 => NULL,
default_btn => 1,
cancel_btn => 2,
icon => 'question');
if n_button_selection = 2 then
-- ROLLBACK TO SAVEPOINT SAVEP1;
But it is still asking Do u want to save ?