Posting errorCannot create a record in Audit trail (TransactionLog). Created ID: 5637144954, Product receipt. The record already exists.

Hi,

Every time I try to create a product receipt, post an invoice or create a purchaes or from released approved purchase requistions I am getting this error: Cannot create a record in Audit trail (TransactionLog). Created ID: 5637144954, Product receipt.( for Product receipt)

The record already exists.

Any help please

this is another error that i do encounter quite often

is there any person with an idea of how it should be done?

I have resolved the same issue in AX 2012,

To over come this issue, please find the below code modifications in Tables–>TransactionLog–>Methods–>create.

The existing Code:

if (appl.lastTransactionIdCreated() != appl.curTransactionId())

{

transactionLog.Type = _type;

transactionLog.Txt = _txt;

transactionLog.insert();

appl.lastTransactionIdCreated(transactionLog.CreatedTransactionId);

appl.transactionlogUpdateTTSControl().revoke();

}

The changes to make:

if (appl.lastTransactionIdCreated() != appl.curTransactionId())

{

if (!TransactionLog::find(appl.curTransactionId()))

{

transactionLog.Type = _type;

transactionLog.Txt = _txt;

transactionLog.insert();

appl.lastTransactionIdCreated(transactionLog.CreatedTransactionId);

}

appl.transactionlogUpdateTTSControl().revoke();

}

Regards

Pavan