Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Issue with Integrations with GP: Violation of PRIMARY KEY constraint PK_eConnect_Out_temp

Posted on by 90
When we try to do address integration from ECOM to GP we are getting below error, we truncating the table eConnect_Out_temp and the address is get integrated successfully. This is happening frequently and we are doing the same. 
Please suggest us, is there any permanent solution for this issue.
 
Error Details:
 
[VALIDATION_FAILURE] [ExportXMLtoGP] Error while calling eConnect_EntryPoint. Details are: Violation of PRIMARY KEY constraint ''PK_eConnect_Out_temp''. Cannot insert duplicate key in object ''dbo.eConnectOutTemp''. The statement has been terminated.
 
Regards,
Gowri Murthy
Ignify

 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Issue with Integrations with GP: Violation of PRIMARY KEY constraint PK_eConnect_Out_temp

    I forgot to add this to the solution.

    After making sure all users are out of GP you can delete the entries, especially in the "eConnectOutTemp"

    Some of my orders having problems were also in the DEX_SESSION table.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Issue with Integrations with GP: Violation of PRIMARY KEY constraint PK_eConnect_Out_temp

    I was having a similar error and found this post through searching. 

    I was attempting to insert Sales orders using Scribe Insight when I got the error.  Scribe uses eConnect to write to the GP database.

    [23000] SQL call failed. Violation of PRIMARY KEY constraint 'PK_eConnect_Out_temp'. Cannot insert duplicate key in object 'dbo.eConnectOutTemp'. The duplicate key value is (Sales_Transaction,  2, , , , , , , , , , , , , ). The statement has been terminated. String data, right truncation

    one of the keys to fixing this problem was looking at the "eConnectOutTemp" table in GP.  It seems like eConnect is not cleaning out the garbage.

    Here is the SQL statements to look in tables that may be locking your files.

    USE DYNAMICS
    select * from SY00800
    select * from SY00801
    select * from ACTIVITY

    use tempdb
    select * from DEX_LOCK
    select * from DEX_SESSION

    use (replace with [Your GP Database])

    [Your GP Database].dbo.eConnectOutTemp 

  • The Alster Profile Picture
    The Alster 5 on at
    RE: Issue with Integrations with GP: Violation of PRIMARY KEY constraint PK_eConnect_Out_temp

    This is an old post but I had the same issue - now resolved.

    What happens is that if the line BEFORE the error line causes the SP to fail (with no errors, i.e. a fatal crash) then the next line will fail with this error (key violation) as the SP does not clean up from the previous line.

    This happened to me because of the decimal places in the timesheet hours or costs - my precision (6 dp) was greater than that set by the users in GP (2 dp).  So it seems that some errors do fail without a proper clean-up.

    In case this helps anyone ...

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans