Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Can't insert Duplicate Key Sales All Transaction Inquiry

(0) ShareShare
ReportReport
Posted on by 12

Client clicks on All Sales Transactions on the Sales Navigation Panel and gets the following error

Duplicate-Error-in-All-Sales-Transaction.GIF

The developer of a custom application that they work with has looked at the temp table and does not find any duplicate data.

I have looked at an error similar to this on the following thread, but, we have tried both suggestions and the error is still present.

https://community.dynamics.com/gp/f/32/t/85492

All suggestions welcome at this point.

*This post is locked for comments

  • Suggested answer
    Bill Campbell Profile Picture
    12 on at
    RE: Can't insert Duplicate Key Sales All Transaction Inquiry

    So client went back into custom app after the developer says all good and does something with the cash customer and pow the problem goes away.

    Seems that they were in the middle of processing something on the customer record but did not commit it on the other side - just a twek in the custom system and we are fixed.

    Thanks for the direction looking for the OPEN and HISTORY

  • Verified answer
    Richard Wheeler Profile Picture
    75,848 Moderator on at
    RE: Can't insert Duplicate Key Sales All Transaction Inquiry

    Looking at the document number of CASHSALE01 you have either just started using GP or just started entering receipts. If you do an inquiry on AR document numbers and enter CASHSALE01 do you see more than one entry? If your developer is writing these records than he/she has created a duplicate. The code needs to be revised to get the correct next document number. The error is telling you a record with this document already exists. The table names with the ## prefix is telling you GP is trying to create a temp table  which means GP will aggregate data from both open and history tables and bring them into this temp table. So most likely this document number exists in both the open and history tables which is why your code can insert the record but the temp table cannot be populated because it results in a duplicate record.

  • Bill Campbell Profile Picture
    12 on at
    RE: Can't insert Duplicate Key Sales All Transaction Inquiry

    One quick update - we looked at the fact that the error appears to be in the TEMPDB and there considered the option of shutting down the SQL Server - however the developer does not believe that will make a difference due to the fact that he can not find a duplicate in any data.

    Suggestions?

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans