CustTransIdRef/RetailCustInvoiceJourTable duplicate records error

Heaving error:
Cannot create a record in Customer transaction identifiers (CustTransIdRef). Transaction identifier: GLRT-112649, Payment voucher.
The record already exists.


First suspicion may come to next number of number sequence that is used. But actually it has nothing to do with it.
The real problems is reference CustTransIdRef.TransRecId -> CustTrans.RecId table.

So we should either delete dummy transactions in CustTransIdRef table that refer to non existing CustTrans or we can increase the next RecId number generated for CustTrans table. Sorting CustTransIdRef table by TransRecId we can find the last number that was used. Increase it by 1 and then update system table SystemSequences where TABID is equal to 78 (CustTrans):
update [dbo].[SYSTEMSEQUENCES]
  set nextval=5637191850
  where tabid=78
Then we should restart AOS as it caches a number (200 by default, afair) of RecId values for each table.

Heaving error:
Cannot create a record in Retail customer invoice journal  (RetailCustInvoiceJourTable). Reference: 5637152082.
The record already exists.

Solution is same, problematic reference is RetailCustInvoiceJourTable.CustInvoiceJour -> CustInvoiceJour.RecId. Table id for CustInvoiceJour is 62.

 

Search

About

DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.

Authors are allowed to set their own AdSense units.
Join us.

Blog Tags