Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Violation of PRIMARY KEY constraint 'PK##0381949'

Posted on by 2,410

When any user chooses the Purchase Order Transaction Nav Pane with a certain date range they get the error:

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

The Temp table above doesn't contain any duplicates, neither do the POP10100 or POP10110 tables.  It only happens in one company.  I've also narrowed it down to a certain number of dates. 

I've seen different fixes for post upgrade, SOP tables, and GL or UPR tables, but none for the Purchasing tables. 

If anyone has seen something like this or has any ideas please let me know. 

Debug Shows this:

'CustomDates OK Button_CHG on form syTrxList'

'ApplyDateRestriction of form syTrxList', 3592, 1

'List_Refresh of form syListObj', 1-0-0-1-0-0-0-0, 4, 0, 0

'RefreshList of form syTrxList', 0, 4, 0

'Refresh of form ListObj_PurchasingTrx', 1-0-0-1-0-0-0-0, 4, "Document Number", 2

'LoadPurchasingTrxListData', 0, "##0381949", 12, 1007, 7/2/2012, 8/3/2012, 1, 0, 2, "", 0

 

*This post is locked for comments

  • Brian_DiFi Profile Picture
    Brian_DiFi 2,410 on at
    Re: Violation of PRIMARY KEY constraint 'PK##0381949'

    After running Check links and Maintenance this issue has gone away.  

  • Dan Liebl Profile Picture
    Dan Liebl 7,320 on at
    Re: Violation of PRIMARY KEY constraint 'PK##0381949'

    Without knowing more, maybe check to see if a trx exists in both the open and history tables and for the date range you found it in.   There is a duplicate somewhere somehow it appears.

    Dan Liebl, CMA CPIM | Senior Consultant | OTT,Inc | DLiebl@OTT-inc.com

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans