Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Violation of PRIMARY KEY constraint 'PK##1253146'. Cannot insert duplicate key in object'dbo.##1253146'.

Posted on by 2,280

We get this error message when trying to issue a check.

[Microsoft][SQL Server Native Client 10.][SQL Server]Violation of PRIMARY KEY constraint 'PK##1253146'. Cannot insert duplicate key in object'dbo.##1253146'.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Violation of PRIMARY KEY constraint 'PK##1253146'. Cannot insert duplicate key in object'dbo.##1253146'.

    Hello Carolyn,

    Ian is correct, that error usually means there is a duplicate record in both the work and history tables. If it was while you were trying to print a payables check then ithere may be a record in the PM10300 (payment work) as well as the PM2000 and possibly PM30200/30300. Once you post it moves from the PM10300 to the PM20000 etc. Sometimes during a posting interruption it will move to the PM2000 but it will get stuck in the PM10000 as well.

    However for assistance with this I would recommend submitting a support incident so an engineer can take a closer look into your data to see exactly what the issue is.

    Best regards,

    Dan Moore

    Customer Online Technical Community

    -----------------------------------------------------------------------------------------

    We hope you get value from our new forums platform! Tell us what you think:

    social.microsoft.com/.../threads

    ------------------------------------------------------------------------------------------

    This posting is provided "AS IS" with no warranties, and confers no rights

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Violation of PRIMARY KEY constraint 'PK##1253146'. Cannot insert duplicate key in object'dbo.##1253146'.

    Hi Carolyn,

    Its most likely data corruption. Do you know the document number of the check you are trying to issue? I would do a sql search on both the Payment work and history tables for this number and see if it is in both.

    Also - try changing the default document number when you are entering the check...if you don't get the error - then its most likely that the next default check number has already been used.

    Ian.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans