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

  • Filetype HTML.xht workaround for Dreamweaver CS5.5

    upon upgrading to Dreamweaver CS5.5, i noticed that files of filetype HTML.xht in one of my web projects either wouldn't open in Dw, or wouldn't open with link color cueing and file management. the known workaround is configuring the following files

  • What is Event queue problem?

    HI, I have come across JSF document, they mentioned that Event queue Problem ins SUN's JSF implementation. what is that?

  • What did the forced update for iPod touch 2g(A1288) achieve/do to my ipod?

    help would be appreciated, Sim

  • Dvd player not working

    I am unable to play a DVD.  When I insert a DVD it prompts me to select a region.  It is already set to the correct region (US) and cannot reselect or select another region. The tab is faded out.

  • Apple store iphone 5 a1429

    Hi, I've ordered iphone 5 from the online store to the apple store on Roseville, CA. Before I paid for it I went to the store to check that they selling the a1429 model. First the guy told me they don't sell it, and its only on verizon, but I showed