Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Cash Manager Primary Key Violation

(0) ShareShare
ReportReport
Posted on by 601

My client is trying to put an entry in Cash Account Tranfsers however when the batch is released they get the following error:

Processing: Batch Number: 009766
System Message 5: [Microsoft][SQL Server Native Client 11.0][SQL
                  Server]Violation of PRIMARY KEY constraint 'cashsumd0'. Cannot
                  insert duplicate key in object 'dbo.CashSumD'. The duplicate
                  key value is (PIPECOLP  , 10

  Debugging info: insert
                  cashsumd

Any help is appreciated.

Cherie

*This post is locked for comments

  • Suggested answer
    Mark E Profile Picture
    Mark E 6,431 on at
    RE: Cash Manager Primary Key Violation

    You can try running the CA Integrity checks again, but extend the Ending Date out to 6/6/2079.  This is assuming that the CATran record in question no longer has the 6/6/2079 date, and there are no other similar CATran records with the same incorrect date.

  • Cherie Kane Profile Picture
    Cherie Kane 601 on at
    RE: Cash Manager Primary Key Violation

    So now the Daily Cash Balances screen is incorrect.  The balance shows the amount from the trx with the 6/6/2079 date.  Since the screen is using work tables and such what is the best way to get this corrected.

  • Cherie Kane Profile Picture
    Cherie Kane 601 on at
    RE: Cash Manager Primary Key Violation

    Thanks for the reply Mark.  This worked perfectly!

  • Verified answer
    Mark E Profile Picture
    Mark E 6,431 on at
    RE: Cash Manager Primary Key Violation

    I see... Not sure why it is trying to insert a new record, might have something to do with the trandate being 6/6/2079 (which is the default date used when the entered date does not fall withing the min/max date parameters in the screen).

    What I would do is:

    1. Delete your CA Transfer batch that is throwing the error

    2. Update the existing CATran record that has the incorrect trandate to the desired date.

    3. Run the CA Integrity Check for the Cash Acct, using the Starting Date as the corrected Tran Date, and thru the current date.  Use the Optional settings to filter on the affected CpnyID, Bank Acct and Sub.

    That should resolve the issue.

  • Cherie Kane Profile Picture
    Cherie Kane 601 on at
    RE: Cash Manager Primary Key Violation

    The client is on SL2011 FP1.  There is a record in the CashSumD table for the combination.  They are trying to reverse an entry that was entered with a date of 06/06/2079.

  • Mark E Profile Picture
    Mark E 6,431 on at
    RE: Cash Manager Primary Key Violation

    What version are they using?  In SL 2015CU1, the CashSumD0 Index is PRIMARY KEY CLUSTERED on CpnyID, BankAcct, BankSub, PerNbr, TranDate.  For some reason, the Transfer is attempting to insert a new record, instead of updating the current one.  Check to see if there is already a CashSumD record for the above combination of key fields.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans