Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

eConnect Bank Transaction Error- Violation of PRIMARY KEY constraint 'PKCM20200'.

Posted on by 18,265

Hello,

I am getting following error while importing Bank Transaction.

Microsoft.Dynamics.GP.eConnect.eConnectException: Violation of PRIMARY KEY constraint 'PKCM20200'. Cannot insert duplicate key in object 'dbo.CM20200'. The duplicate key value is (252564.00000).

on Cm20200 - CMDNUMWK,RecNumControl these two fields hold value (252564.00000). I am not sure why system is considering same value again? 

Did CheckLink on CMTransaction but no luck.

Any help on this is highly appreciable.


Thanks much
Sandip

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: eConnect Bank Transaction Error- Violation of PRIMARY KEY constraint 'PKCM20200'.

    The value 252564.00000 comes from the dbo.CM40102 table.

    To validate, you can check your next number by calling the following command in SQL :

      DBCC CHECKIDENT ('dbo.CM40102', NORESEED)

    Then you could correct it by running the following :

     DECLARE @CMRECNUM numeric(19,5)

     SELECT @CMRECNUM = max(CMRECNUM) FROM CM20200

     DBCC CHECKIDENT ('dbo.CM40102', RESEED, @CMRECNUM)

  • 26P2ER Profile Picture
    26P2ER 1,773 on at
    RE: eConnect Bank Transaction Error- Violation of PRIMARY KEY constraint 'PKCM20200'.

    Hello Sandip:  

    1. If you have access to BT in GP are you able to add this row via GP manually?
    2. Are there any SQL triggers on the CM20200 table?
  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    RE: eConnect Bank Transaction Error- Violation of PRIMARY KEY constraint 'PKCM20200'.

    Hi Ven,

    Appreciate for your reply. But no luck. I am not sure why it is happening. Client has installed Binary MultiEntity module that may be affected?

    Any further help on this will be highly apprecaible.

    Thanks much

    Sandip

  • Suggested answer
    26P2ER Profile Picture
    26P2ER 1,773 on at
    RE: eConnect Bank Transaction Error- Violation of PRIMARY KEY constraint 'PKCM20200'.

    Hello, Sandip -

    It appears you have configured BankTransc to post through GL for the company in question.

    I have run into a similar error while importing JE entries via Dynamics Web Services.

    What would work for me is cleaning up the econnectOutTemp table (on the company database) and checking to see if there are any orphaned records in child tables in your case may be CM20400, etc.

    Did you run check links on Financial transactions as well? 

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans