Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Unable to generate G/L entries for Inventory Transactions

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:
  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: Unable to generate G/L entries for Inventory Transactions

    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.

  • K-R-D Profile Picture
    K-R-D 120 on at
    RE: Unable to generate G/L entries for Inventory Transactions

    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
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: Unable to generate G/L entries for Inventory Transactions

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans