web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Unable to generate G/L entries for Inventory Transactions

(0) ShareShare
ReportReport
Posted on by 120

GP 2020 (18.3.1173)

Manufacturing (18.3.1173)

Windows Server 2012

SQL Express (15.0.2000.5)

I've finished a fresh install of GP 2020 with Manufacturing and have found that no G/L transactions are created for Inventory Adjustments (which will be used by the manufacturing module). The Item Transaction Inquiry shows that the posting to the Inv subledger worked fine.

Master Posting and Batch recovery remain empty.

Posting setup for Inventory/Transaction Entry looks OK (Post to General Ledger on, Post Through off, Allow Transaction Posting off, Include Multi Currency on.

I've created GP SQL Logs captured during the posting process (initiated by an inventory batch post). It shows the error:

[Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'PKIV10000'. Cannot insert duplicate key in object 'dbo.IV10000'. The duplicate key value is (sa             , XIV_Trxent     , 1, 00000000000000165).*/

So it appears there is a failure but it doesn't name G/L Transactions Work as in error, names the inv batch header.

I haven't seen any information across multiple blogs where this is occuring in other instances, so it must be unique to my configuration and settings, but I can't for the life of me figure out what.

Categories:
I have the same question (0)
  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi,

    Are you doing this in a company you created yourself from scratch ? what about the demo company (TWO) Fabrikam ? out-of-the-box the company should have all modules enabled and registered, as well as some defaults setup already. It looks like you're having an issue with your IV10000 table (Inventory Transactions Work) and I'd start by running a check-links against this table.

  • K-R-D Profile Picture
    120 on at

    Salut Beat.

    It is Fabrikam and I have done checklinks against the company and Dynamics databases. SQL server has been restarted so tempdb is clear.

    Ken

  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi Ken,

    Please check this forum post from a few years ago where I had to analyze a PK violation on a GP table.. Granted it was not the same, but the approach remains the same.

    community.dynamics.com/.../violation-of-primary-key-constraint-pk

    The IV10000 table has a key constraint based on the following fields :

    BACHNUMB, BCHSOURC, IVDOCTYP, IVDOCNBR

    Running this SQL code would return any duplicates from that table:

    select BACHNUMB, BCHSOURC, IVDOCTYP, IVDOCNBR,  count(*) as Nb_of_occurence from IV10000

    group by BACHNUMB, BCHSOURC, IVDOCTYP, IVDOCNBR

    having count(*) > 1

    LMK if you find anything.. Based on that, I'd guess that you have a failed batch somewhere that started a process halfway thru but didn't complete properly.

    Another thing you can use is to install the GP PowerTools and activate the free 30-days trial key. The tool could help you to track down where the problem might be, by enabling a DEXSQL trace just before starting the process.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans