Violation of PRIMARY KEY constraint 'PK_CustCnAttr'


(William) #1

So, I ahve had a lot of errors the past year now, and this one is a new one to me. Anybody have this before?

Error Detail

Message: An error occurred while updating the entries. See the inner exception for details.
Inner Exception Message: Violation of PRIMARY KEY constraint ‘PK_CustCnAttr’. Cannot insert duplicate key in object ‘Erp.CustCnAttr’. The duplicate key value is (VT, 331, 00127, 1, ).
The statement has been terminated.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.CustCntImpl.Update(CustCntDataSet ds)
at Erp.Adapters.CustCntAdapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Erp.UI.App.CustomerEntry.Transaction.UpdateContacts()

Inner Exception

Violation of PRIMARY KEY constraint ‘PK_CustCnAttr’. Cannot insert duplicate key in object ‘Erp.CustCnAttr’. The duplicate key value is (VT, 331, 00127, 1, ).
The statement has been terminated.

Inner Stack Trace


(Jose C Gomez) #2

Looks like you are trying to create a duplicate attribute


(William) #3

Yeah, thats what I was thinking, but I can’t seem to find the duplicate. This would be a duplicate contact, right?


(Dave Moon) #4

the key is Company,CustNum,ShipToNum,ConNum,AttrCode

So it is trying to duplicate that combination