Prompt An exception occurred on the server: Violation of PRIMARY KEY constraint 'PK_#tempSto_95F99E17DC30795D'. Cannot insert duplicate key in object 'dbo.#tempStockList'. The duplicate key ... when preview the Closing Stock Listing



Cause

Cause by multiUOM item have different costing method



Solution

Run the script in the attachment and amend the affected Stock.