Notifications
Announcements
No record found.
We are facing an issue with a custom multithreaded batch job in D365FO that processes data and creates transfer/movement journals.
The error occurs during standard journal posting logic: Violation of PRIMARY KEY constraint 'I_7874ITEMDIMIDX'. Cannot insert duplicate key in object 'dbo.INVENTSUM'.
The problem occurs when multiple threads try to update the InventSum table simultaneously, leading to the error. Exception handling is in place, including Exception::DuplicateKeyException, but the error is not being caught. Some records remain unprocessed due to this failure.
Exception::DuplicateKeyException
Has anyone encountered a similar issue with InventSum in multithreaded processing? What best practices can be followed to handle concurrency on InventSum and prevent duplicate key conflicts in a multi-threaded batch job?
Looking forward to insights from the community. Thanks in advance!
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 451 Most Valuable Professional
André Arnaud de Cal... 428 Super User 2025 Season 2
BillurSamdancioglu 239 Most Valuable Professional