5 Replies Latest reply: Aug 29, 2012 2:38 AM by user12861981 RSS

    Problem in clearing record from form (Urgent)

    user12861981
      Hi all,

      I am working on oracle(APPS) forms 10g. There is one existing form, on that form i require a CANCEL button.
      Functionality for CANCEL button is :
      There is a Check Box on the form next to each record.
      - When i click on check box then flag should goes to 'N'
      - and when i click on that CANCEL button this record should be clear from form only, not from Database.
      - In database Flag should be 'N' only.

      For that i have created one cancel button, On the WHEN-BUTTON-PRESSED trigger i have written a below code:

      UPDATE XXCAPL_TOOLS_RETN_MAINSTORE_DT
      SET APPROVAL_FLAG = 'N'
      WHERE return_mainstore_hd_id = :XXCAPL_TOOLS_REQST_APPROVAL_V.RETURN_MAINSTORE_HD_ID
      AND return_mainstore_dt_id = :XXCAPL_TOOLS_REQST_APPROVAL_V.RETURN_MAINSTORE_DT_ID
      AND organization_id = :XXCAPL_TOOLS_REQST_APPROVAL_V.ORGANIZATION_ID ;

      GO_BLOCK('XXCAPL_TOOLS_REQST_APPROVAL_V');
      FIRST_RECORD;
      LOOP
      IF
      :XXCAPL_TOOLS_REQST_APPROVAL_V.APPROVAL_FLAG = 'N'
      THEN
      clear_record;
      END IF;
      EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE' ;
      NEXT_RECORD ;
      END LOOP ;
      COMMIT;

      Issue is when i click on checkBox and then cancel button flag goes to 'N',
      But record is not gone from Form.
      When i click on another checkbox and click on CANCEL button then the previous record which i already checked has gone.
      When i close the form and again open it then all the records which are gone they comeback on the form.
      What should i do in this case. Plz.... HELP....!!!! Its ....so..URGENT....!!!!