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

Community site session details

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

Duplicate Key Error

(0) ShareShare
ReportReport
Posted on by 395

We started 'Tracking Voided Transactions in History' and are now getting duplicate key errors for the voided invoices. Is something not setup correctly?void.jpg

I have the same question (0)
  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Duplicate Key Error

    What do you mean by 'Started Tracking Voided Transactions in History'. Voided transactions always go to history.

  • Joseph Markovich Profile Picture
    3,976 on at
    RE: Duplicate Key Error

    In Sales Order Processing setup, there is actually a checkbox to keep the voids in history:

    Track Voided Transactions in History

    Mark this option if you want to maintain historical records for voided transactions. If you decide not to use this option, the document number that was assigned to each voided document can be reused on a future document.

    Joe

  • Suggested answer
    Joseph Markovich Profile Picture
    3,976 on at
    RE: Duplicate Key Error

    Hi Taylor-

    You may want to try a couple of things:

    1) Restart your SQL server. In the error message, the object 'dbo.##2015551' is a temporary table. These are cleared when the server is restarted.

    2) What kind of invoice transaction were you attempting to void? From Invoicing or from Sales Order Processing? Look at the document number of the transaction you are trying to void and then run a SQL query on the history table of either invoicing or sales order processing to see if it is already there.

    The key value it is referencing: "May 6, 2023 12:00AM, 1, 10, 02434098, 3462" is GP creating a record in this temporary table and that is the primary key value (these are specific values from the transaction you are attempting to void and it is combining them to create a unique key). There appears to be a duplicate record somewhere else in the tables of the transaction you are trying to void.

    Joe

  • Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Duplicate Key Error

    I pulled this straight out of the GP help guide.

    Track Voided Transactions in History   Mark to maintain a historical record of voided transactions. If you don‘t mark this option, voided documents will be removed after posting and won‘t be included on reports. Voided document numbers cannot be used again.

  • Taylor_Greenwood Profile Picture
    395 on at
    RE: Duplicate Key Error

    I restarted the Server that SQL is run on to no avail.

    They are Deleted from the Invoice Entry screen before being posted. This only began after we started tracking history, which is helpful for us.

    It looks like they are all staying in IVC10100 after being voided.

    7206.Voids.PNG

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,100

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 633 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans