How to suppress 'Do u want to save the changes?'  When there are no changes

Hi All,
I have developed one form,which contains 3 blocks in that 2 are database blocks and one is control block.It's working fine.When I close the form without doing any change also it is showing an alert as 'Do you want to save the changes you have made?'. How can I suppress that alert when I haven't made any change to the form.
I am displaying one filed in the database block as 'null' until check box is checked.For that I have written code in when-new-block-instance trigger of that block.
There I wrote SET_RECORD_PROPERTY (GET_BLOCK_PROPERTY (:SYSTEM.TRIGGER_BLOCK, CURRENT_RECORD), :SYSTEM.TRIGGER_BLOCK, STATUS, QUERY_STATUS); also to change the block status as query.
But it is not working, still I am getting the alert,How can I solve this could anyone please give me a suggestion..
Thanks in advance.

So, this functionality can be done through CHECK BOX itself. Why you are making null by WHEN-NEW-BLOCK-INSTANCE. You can just set the update and insert property for that fields and rest things you can control from chexbox. And WHEN-BLOCK-INSTANCE-TRIGGER will fire once when you will access that block. If you want to set the same functionality for each record. Then you must use WHEN-NEW-RECORD-INSTANCE. for ex.
Trigger = WHEN-NEW-RECORD-INSTANCE (BLOCK-LEVEL)
Here i will assume that if check box is checked then he can update that fields.
IF :CHECKBOX='Y' THEN
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_TRUE);
ELSE
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_FALSE);
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_FALSE);
END IF;In the above code no need for set value to NULL.
And on CHECK BOX you can write like this...
Trigger WHEN-CHECKBOX-CHANGED (ITEM-LEVEL)
IF :CHECKBOX='Y' THEN
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_TRUE);
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_TRUE);
ELSE
  :FIELD_NAME:=NULL;  -- here if check box is unchecked then it will set value to NULL
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',INSERT_ALLOWED,PROPERTY_FALSE);
  SET_ITEM_PROPERTY('BLOCK_NAME.ITEM_NAME',UPDATEABLE,PROPERTY_FALSE);
END IF;-Ammad

Similar Messages

Maybe you are looking for

  • Need to create tree-view page.

    I'm trying to create a tree-view display using Oracle JDeveloper 10g Release 3, ADF and JSF. I need to show a tree (folder names) and on a click of the last level folder to show table with File names that are related to the selected folder. Data is s

  • IDOC Header Record

    Our scenario is  File(s) ---> XI - > IDOC We are receiving 3 Different Files, with Employee information from 3 different Countries and using XI , the records will be posted into R/3. Each record from the file will be treated as an IDoc. The File is g

  • MacBook crashes regularly

    Hello there, hopefully somebody can point me in the right direction. My MacBook (Purchased May 2006) crashes at least twice a day, especially when I am working. What's really annoying is that when I boot into Windows or Linux (Yellow Dog) it never cr

  • Exporting Vids from Photo Booth

    I'm not sure if this is the correct discussion venue so please redirect if it should be posted elsewhere. I'm trying to email videos from Photo Booth. I used to just click email, Mail would pop up and the videos would go out. Now it says the server c

  • Adobe  download  assistant  dont  install

    hello   today  i  had  downloaded  adobe  donwload  assistant  in  my  downloads  folder  but  with  right  clik   it doesnt  run at  all.i  have   windows  8  x64