Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

Violation of Primary Key Constraint while printing an SOP Edit List

Posted on by Microsoft Employee

We are getting this error:  :Violation of Primary Key Constraint PK##2090355  Cannot insert duplicate key in object dbo.PK2090355 but we are able to get the SOP Edit List by clicking through.    Any thoughts?

*This post is locked for comments

  • Suggested answer
    Vinutha Holla Profile Picture
    Vinutha Holla 705 on at
    Re: Violation of Primary Key Constraint while printing an SOP Edit List

    Hi,

    Here are suggestions to resolve the warning message:

    **NOTE: Please ensure that you have a restorable BACKUP prior to performing any system maintenance.**

    **NOTE: If possible, you may wish to test this in a test company created from a backup of your live data.**

    1. These tables store information when the AA Edit List is generated. Please do a query on these tables when no one is printing. Below are the SQL scripts to run:

    Select * from AAG50000

    Select * from AAG50001

    Select * from AAG50002

    These should return no results. If results are returned, please delete the records and then try to print the Edit List again. It will repopulate the tables while the transaction Edit List is being printed.

    2. Also you may want run the following SQL statement along with deleting information from the AA tables does not resolve the issue:

    Use dynamics

    DELETE SY00800

    DELETE SY00801

    DELETE ACTIVITY

    Use tempdb

    DELETE DEX_LOCK

    DELETE DEX_SESSION

    Regards,

    Vinutha

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Violation of Primary Key Constraint while printing an SOP Edit List

    Thank you Vinutha.   I disabled AA and the error goes away.    The GP Version is 10.00.1424.   Would I need to recreate the AA and the GP reports.dic?    It occurs on all workstations for all users.   I also get the error message (after clicking through this first error msg) that the "aagUpdateRepTableforEditlist" returned the following error msg - DBMS 2627.    Any other thoughts?  

  • Suggested answer
    Vinutha Holla Profile Picture
    Vinutha Holla 705 on at
    Re: Violation of Primary Key Constraint while printing an SOP Edit List

    Hi,

    The Violation PRIMARY KEY constraint error is referring to a temp table so it will be best to stop and start SQL Server. Below are the steps:

    Note: Before performing any troubleshooting steps make sure to have a restorable back-up. Have all users logout of Great Plains.

    1. Go to Control Panel | Administrative Tools | Services.

    2. Locate and select the SQL instance and click Stop. Once the server has been stopped, please click Start.

    3. Check if the issue persists.

    If the issue persists, please answer the questions below:

    1. Are you using a modified SOP Edit List? If so, please try to use a canned version and check if the issue persists.

    2. Do you also get an error when trying to print an edit list to other modules? If so, it may be possible that the Reports.dic got corrupted and you might need to recreate it.

    3. Does this issue occur with all users, including 'sa'? Does the issue happen in just one user login? If so, you would want to create a new user login and see if the issue still persists. There are times that user logins get damaged and corrupted.

    4. Does this issue occur on all workstations? If the error does not occur on all workstations, try copying the Dynamics code folder from a working station to the non-working station or re-installing the non-working station.

    5. Does this issue occur if the task is performed at the server? If the task is performed successfully at the server, there may be something damaged with the workstation installs or with the network connection.

    6. Does this issue occur for all companies? If not, what is different about the company that it does not work for? Has it recently been added or significantly changed in any way?

    7. Do you have any third party application or customization? If so, you would want to disable any third party application by going to Tools | Customize | Customization Status and see if the issue still persists. There are times that stored procedures and triggers of third party application or customization interfere with how the system normally operates.

    8. Are you using Analytical Accounting?

    9. Please let me know the GP version.

    10. Are you getting any other error after clicking OK on the Primary Key Violation error?

    Regards,

    Vinutha

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans