This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided "as is" with no warranties.


The following error will be encountered when Deploying of a Package:

"Violation of PRIMARY KEY constraint 'PK__#A4B036B__3214EC26F41307C1'. Cannot insert duplicate key in object 'dbo.@Field'. The duplicate key value is GUID"



You will be unable to deploy the view or form to the destination environment.

Troubleshooting Steps

To resolve this, please follow these steps:
1. Navigate to the affected view or form on the source environment and determine if there are any ALMs raised on the Layout of the design.
If there are no errors present it could be caused by duplicate entries on the XML layout.

2. Duplicate entries can be obtained by collecting the view or form xml from K2 Designer.
To get the needed XML please log a K2 Support Ticket on the K2 Customer Portal for assistance and also to determine the problematic control.