Troubleshooting: Change Item Code error - Violation of PRIMARY KEY constraint PK ItemLocationPrice

From AutoCount Resource Center

Question : Merge item code prompted application error – Violation of PRIMARY KEY constraint PK_ItemLocationPrice. Cannot insert duplicate key in object dbo.ItemLocationPrice.

Version : 1.8 / 1.9 / 2.0

Primary key itemlocationprice1.png

Possible Reason :

Both Item 1 and Item 2 have records for Item Price by Location. This is a conflict for item merge.

Solution :

1) Go to Stock > More Stock Maintenance > Item Price by Location Maintenance.

Primary key itemlocationprice2.png

2) Check the checkbox of one selected record to delete and click on Save.

Primary key itemlocationprice3.png

3) Perform again change and merge item code, it will be completed successfully.

Primary key itemlocationprice4.png

Primary key itemlocationprice5.png

By : Zhi Lin 200807, Lay Swan 200824, P200826

Go to menu

IconAcc20.PNG AutoCount Accounting 2.0 & 2.1

IconAcc188.PNG AutoCount Accounting 1.8 / 1.9
Wiki-Payroll.png AutoCount Payroll
Wiki-POS.PNG AutoCount POS

Wiki-AOTG.PNG AutoCount On The Go
Wiki-Accounting-Plugin.png AutoCount Accounting Plug-In Documentations