web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Violation of PRIMARY KEY constraint 'PK##0381949'

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Dan Liebl Profile Picture
    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

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

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans