Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error "Violation of PRIMARY KEY Constraint "XXXXXXXX". Cannot Insert Duplicate Key in object "XXXXXXXX"." When Entering Transactions in Project Accounting in Microsoft Dynamics GP


View products that this article applies to.



[Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint "XXXXXXXX". Cannot insert duplicate key in object "XXXXXXXX".
[Microsoft][ODBC SQL Server Driver][SQL Server] Violation of PRIMARY KEY constraint "XXXXXXXX". Cannot insert." occurs when entering Transactions.


Note -XXXXXXXX in the above error couldbe PA00511, PA01121, PA01221 and/or PA01304.



Resolution


This error is a result of missing periodic records. Typically, when periodic records are created, they are created for an entire Fiscal Year. For some reason, only a portion of the periodic records for this Contract/Project/Budget exist. It is trying to insert the whole years worth of periodic records again. Since part of the year already exists, this error regarding duplicates is being generated.

To resolve the error, the missing periodic records need to be created. To create the missing periodic records perform the following steps:


1. Have all users exit the application.


2. Make a BACKUP of the database that can be restored in case an undesired data loss occurs.


3. On the Microsoft Dynamics GP menu, point to Tools, point to Utilities, point to Project, and then click PA Recreate Periodic.

4. If this is happening for a limited number of customers, select a customer range. If it is random or all customers, do not enter a customer range.


5. Leave the options set to Recreate Periodics and click Process.


6. On the Microsoft Dynamics GP menu, point to Tools, point to Utilities, point to Project, and then click PA Reconcile Periodic. 

7. Enter customer range (if needed) and click Process.


Note - Both the recreate and reconcile periodic processes can be very intense and may take a while to process. The best indication of performance is past performance. Please allocate sufficient time for the processes to complete.

↑ Back to the top


Keywords: kbnosurvey, kbmbspartner, kbmbsmigrate, kb

↑ Back to the top

Article Info
Article ID : 859302
Revision : 1
Created on : 3/3/2017
Published on : 12/31/2014
Exists online : False
Views : 185