Error when attempting to save Purchase Order

SOLVED

One of our Purchasing end users created a PO with over 250 line items.  The EU saves often and at one point they received the following error message:

     "Module: Company: XXX AppName: Enter Purchase Orders Error < 0 > occurred at < frmPurchOrd> in Procedure < DMPreSave . Violation of PRIMARY Key Constraint 'PK_tciSTaxCodeTran_08961D2F'>  Cannot insert duplicate key in object 'dbo.tciSTaxCodeTran".  The duplicate key value is (627838, 2).  The statement has been terminated.

Their only option was to "X-Out" and close the PO.  When they reopened the PO all of the lines that were entered since the last successful save were missing.  At this point, the EU re0entered the missing line items and proceeded without issue.

A few weeks pass and a different end user opens the PO to make changes, again saving often, and at some point when they tried to save, the same error message (the Duplicate Key Value is different).  This time when we reopened the PO we found some missing line item data (Qty and Required By/Promised dates).  We filled in the missing data and was able to save once but the second attempt failed (same error message) and the data was missing for the same line item.

To move forward we deleted the line item and added it to the end of the PO and have not had any further issues so far but it's a living PO and odds are we may need to make modifications again.

Any ideas why this would be occurring?  Is there a limit on the number of line items one should enter on a PO?

Thanks,

Rob

  • 0
    verified answer

    I don't believe there is a real limit on PO lines.  So 10,000 lines in theory should be ok.  You might be running into a bug.  Do you use Avalara or any other 3rd party products?  The gotcha though is unless you can duplicate the problem you won't be able to get any help probably.  Another possibility is that the SQL connection got dropped/timed out.  Sorry not much help.  

  • 0 in reply to JohnHanrahan
    verified answer

    We have this same issue on new POs occasionally, but have never been able to reproduce it. Our only solution has been to recommend saving often (every 5-10 lines) so that, when the error does happen, you don't lose as much work.