This discussion is archived
5 Replies Latest reply: Sep 29, 2013 10:43 AM by PavelA-o. RSS

Commit data in current block has saved the previous block too

sm*290887*m7 Newbie
Currently Being Moderated

Hi all,

 

I got two data block. The first block in the master header, where I asked the user to enter the customer information and once finished entered, they need to pressed Save button to save the record.

 

The second block is the detail block where user needs to call the data from other view and pull the data into the tabular form. In here, I have created a delete button to delete the records where choose by user in the check box. Here the problem is when user press the delete button, the records in the previous master block is getting commit as well beside commit for the second block.

 

This is my script in the delete button.

 

begin

GO_BLOCK('ACT_QT_TXN2');

FIRST_RECORD;

LOOP

      IF :ACT_QT_TXN2.CHECK_BOX297 = 1 THEN

           delete_record;

      ELSE

         NEXT_RECORD;

     END IF;

 

     IF (:System.Last_Record = 'TRUE')  and :ACT_QT_TXN2.CHECK_BOX297 = 1 THEN

               DELETE_RECORD;

               EXIT;

     ELSE

            IF  (:System.Last_Record = 'TRUE') THEN

                    EXIT;

            END IF;

     END IF;

   

END LOOP;

COMMIT;

 

FIRST_RECORD;

execute_query(no_validate);

end;

 

However, when I keep on press on the check box to select the record for delete again, the master block is not getting committed again. It is only commit on my first button clock on the delete button.  How could this happened ? where is the possible problem ?

 

Thanks.

Lim

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points