Deleting records in spectrans table

Hi All,
I am new to AX .I have been resolving a bug while settling open transactions for customers.
(Error:Cannot create a record in Balance (CustVendTmpOpenTransBalances). Amount: 0,00.
The record already exists.)
After a lot of search online , I came to know that deleting orphaned records in SpecTrans Table is the solution for most of the cases so as in my case.But I have few queries regarding this. Here are they:

  1. The data source for the settle open transactions form is the CustTransOpen Table and though SpecTransTable is being orphaned it has nothing to do with this form (correct me if i am wrong), Then why is this error related to SpecTransTable.
  2. Is it Safe to delete these records in SpecTrans Table.
    Please kindly give me your thoughts

SpecTrans will hold the record that are marked for settlement and will be deleted after settlement is done.
So you should identify the particular records in specTrans (through debugging) that are causing the issue, rather than deleting everything from it.
Note - SpecTrans is not a company specific table.

Moving the post to developer forum.

Hi Kranthi,
Thank you very much for your valuable response.

I did not mean deleting everything from the spectrans table.
I have identified those records through debugging .These are few records which are being created and orphaned every time during the process of creating and invoicing credit notes and I am afraid deleting them could cause a problem.

Do you mean they are created every time?

Yes. They are created during the following process:
adding amount to customer’s account > invoicing him for a service using this amount >generating RTOI >selecting this transaction for a credit note>invoicing this credit note.
Here is my inference :
I figured out that there are four records which are created and orphaned.These are causing the error .
while opening the settle open transaction form there are some validations on the records marked for settlements in spectrans for that particular customer . Though these orphaned records are not marked their presence in the table fails these validations resulting the error.

Thanks anyways

Does that mean any transaction done to the customer?

have you investigated on why these records are being inserted?

Do the same transactions in the standard environment to identify the difference.

okay sure I will let you know

Hi Manideep, Any update on issue above because I am experiencing the same problem and I will like to know how you resolve the issue.

If you still cannot find a solution, please feel free to create your own new post.