Home » Developer & Programmer » Forms » Unable to display Do you want to save the changes you have made? message
Unable to display Do you want to save the changes you have made? message [message #458894] Wed, 02 June 2010 07:05 Go to next message
dhanasurya
Messages: 33
Registered: May 2010
Member
Hi All,
I have one requirement.i.e I want to display 'Do you want to save the changes you have made?[YES/NO]' message when record status is changed.In my form if i enter some value to the actual qty(db item)
and press 'x' button it does't prompting 'Do you want to save the changes you have made?' message.

For displaying this message i have written following code in the APP_CUSTOM body:

IF (wnd = 'XXMZ_MRS_DET')
THEN
lv_wnd_stat := get_window_property('XXMZ_SUMMARY',VISIBLE);
if lv_wnd_stat = 'TRUE' THEN
IF :SYSTEM.form_status = 'CHANGED' THEN
CLEAR_BLOCK(ASK_COMMIT);
ELSE
CLEAR_BLOCK(no_validate);
END IF;
SET_WINDOW_PROPERTY ('XXMZ_DET', visible, property_false);
ELSE
app_window.close_first_window;
END IF;

if i write above code in the app_custom body it's prompting the above message.But if i click 'YES' it does't save the records?
why it's happening?

How can i save the records when i click 'yes'?

Anyone please help me out

Thanks,
Re: Unable to display Do you want to save the changes you have made? message [message #458897 is a reply to message #458894] Wed, 02 June 2010 07:14 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why are you using clear block?
Why are you writing any code at all? What's wrong with the default functionality?
Re: Unable to display Do you want to save the changes you have made? message [message #459033 is a reply to message #458897] Thu, 03 June 2010 02:07 Go to previous messageGo to next message
dhanasurya
Messages: 33
Registered: May 2010
Member
Hi,

Sorry for the late reply.

I have 3 windows in my form.IF I do any validation(like..change the db item value) at 3rd window it does't ask the message(Do you want to save the changes you have made?[YES/NO]') while closing the 3rd window.It is asking the message while closing the first window.

How can i display the message at 3rd window?

How can i write window logic in the app_custom body for the 3 windows?

Thanks,
Re: Unable to display Do you want to save the changes you have made? message [message #463874 is a reply to message #459033] Mon, 05 July 2010 00:58 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Sorry that I have been so long in replying. Have you solved your problem?

What value are you getting back from "get_window_property('XXMZ_SUMMARY',VISIBLE);"?

David
Previous Topic: date
Next Topic: Unable to save the record in the database
Goto Forum:
  


Current Time: Fri Sep 20 03:37:52 CDT 2024