Announcements
No record found.
Hi,
I got following error while posting Free text invoice
"cannot insert multiple records in accounting distributions (accountingdistribution), record already exists"
Do I have to check some setups?
*This post is locked for comments
Hi Joni,
Is this a clean environment or was it used before and transactions were deleted to start over again?
This is not related to setup.
Hi Andre,
I just restored the DB with changes of previous week.
in accountingdistribution table I see more then Million records
This could be caused by the database restore. Probably some records are missing or there are some records already present which are created during posting again. You can e.g. use the debugger to find that place. Or find the related records in the AccountingDistribution table using the SourceDocumentLine fields on this and the free text invoice line table.
The error comes from classes\SourceDocumentStateInProcess\persistAccountingDistributionInsertList() method. Line: distributionInsertList.insertDatabase();
where distributionInsertList is RecordInsertList class.
Can you advice some additional way?
Dear Joni,
Your query is not clear.Kindly provide the screen shot to make it more clear so that I can help you in this.
Hi Prashant,
I'm trying to post "Free text invoice" and I'm getting the error: "cannot insert multiple records in accounting distributions (accountingdistribution), record already exists"
Because I could go directly on the line from info, I added breakpoint to add method of info class and found out that error comes from below method
private void persistAccountingDistributionInsertList() { if (initializedDistributionInsertList) { distributionInsertList.insertDatabase(); accountingDistributionSystemSequence.removeRecIdSuspension(tableNum(AccountingDistribution)); } }
If you use the AX debugger, you can set a breakpoint on this method. Then you can see which other method is calling this one and all related variables to investigate further.
it will be good if you start debugging from CustPostInvoice (Class) and reach till SourceDocument, so you will come to know exact location of issue.
Following link might be help you
sashanazarov.blogspot.com/.../bug-in-source-document-framework-ax.html
Regards,
We also faced similar issue in AX2012 R2. We reset the accounting distribution on Free text invoice line after which system allowed us to post the document. Here to be noted that the distribution needs to be reset for every line.
Thanks
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.