How to delete a record if client crashes?

Hello everyone.

I want to ask a question about record management in AX 2012. 

I have a table of payments. When user opens Payment form, i insert a zero record to this table. After user enters the payment amount in the edit method field on the form, i process this payment and update the zero record with the processed information (the table has many fields that the entered payments are distributed between this fields). 

My question is: Sometimes (rarely), when a user opens Payment form, the client crashes and, the zero record i inserted at the Form Opening, stays in that table. But this is error for me. How can i make the record to be deleted if the client crashes? This have to be done immediately, because, when the user finishes his/her work, she/he must post this payment (posted) to Ledger.


Any help will be greatly appreciated. 

Thanks in advance.