Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Cannot create a record in Inventory transactions (InventTrans). The record already exists.

Posted on by 20

Hi All,

Below I have briefly explained problem and its solution so that it might help someone out there. Please do update your comments/feedback, if someone find it helpful.

Problem:

We faced an un-desired behavior in AX 2012, it started throwing "Cannot create a record in Inventory transactions (InventTrans). The record already exists." with every transaction that was being created in InventTrans from any Dynamics AX module.

IT_5F00_error.jpg

Solution:

We did following steps that resolved the issue:

1. Open AX client and

2. Switch to development workspace (Ctrl+D)

3. Cleared all cache/garbage object shown in screenshot below

4. Restart AOS service

5. Start the AX client again, create & verify InventTrans transaction

DW.jpg

Regards,

Irum

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: AX 2012 - Cannot create a record in Inventory transactions (InventTrans). The record already exists.

    Dear Irum

    I had the same problem and the solution you mentioned works

    Thank You 

    Regards

    Bilal Yaqub

  • Roshani Profile Picture
    Roshani 20 on at
    RE: AX 2012 - Cannot create a record in Inventory transactions (InventTrans). The record already exists.

    Hi Brandon,

    Thanks for sharing your valued suggestion.

    I did checked & verified InventTrans next record value in SystemSequences and observed that InventTrans RECID was < SystemSequence NextVal. So I don't see that this was a RECID issue. Yet for me, restarting AOS service does the job.

    Actually we faced "Cannot create a record in Inventory transactions (InventTrans). The record already exists." issue for the 2nd time. I guess that this issue happen because of some garbage data in AOT cached elements and clearing AOT cache and restarting AOS service resolved the issue. What's  your expert opinion?

    Irum

  • Suggested answer
    Brandon Wiese Profile Picture
    Brandon Wiese 17,786 on at
    RE: AX 2012 - Cannot create a record in Inventory transactions (InventTrans). The record already exists.

    The primary key for InventTrans is RecId.  It seems most likely that your system sequence has gotten out of whack.

    Run the following SQL on your business database while your AOS is not running (because it reserves blocks of system sequences in memory).

    SELECT MAX(RECID) FROM INVENTTRANS;

    SELECT NEXTVAL FROM SYSTEMSEQUENCES S WHERE TABID = 177;

    If the first answer (the highest RecId already used) is greater than the second answer (the next RecId to be used), then you have found your issue.

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

Featured topics

Product updates

Dynamics 365 release plans