Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
Points: 7050

8/24/2012 3:30:38 PM

Violation of PRIMARY KEY constraint 'PKCM20100'. Cannot insert duplicate key in object 'CM20100'

Server was unable to process request. ---> Violation of PRIMARY KEY constraint 'PKCM20100'. Cannot insert duplicate key in object 'CM20100'.
The statement has been terminated.

GetType: System.Web.Services.Protocols.SoapException
Source: OED2
StackTrace: at OED2.OEDeConnect.createSOPPayment(Int16 SOPTYPE, String SOPNUMBE, Int32 SEQNUMBR, Double PaymentAmount, Int16 PaymentType, String CheckNumber, String CCName, String CCAuthCode, String CCExpnDate, DateTime dtPaymentDate, Int16 PaymentActionType)
at OED2.SOPCreatePayment.RadGridView1_UserDeletingRow(Object sender, GridViewRowCancelEventArgs e)
TargetSite: System.String createSOPPayment(Int16, System.String, Int32, Double, Int16, System.String, System.String, System.String, System.String, System.DateTime, Int16)

This sounds like a straight forward error, I didn't think I'd have too much problem solving it... but I was missing a piece.

This is happening when deleting SOP payments, and only when I delete more than one payment on an order.

When I look in the table, there is a record there with '0' for the CMRECNUM, and it seems like the second delete is trying to do the same thing - hence the dup key issue
Version: GP 9,GP 10,GP 2010
Section: eConnect

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables