Error Violation of PRIMARY KEY constraint 'PK_CPMetadata' when adding configurable lookup fields v2012
Symptoms
Following error occurs when trying to add user defined configurable lookup fields:
Error/warning messages
Violation of PRIMARY KEY constraint 'PK_CPMetadata'. Cannot insert duplicate key in object 'dbo.CPMetadata'. The duplicate key value is (, LookupCode1).
Reason
User is trying to add a lookup, not a configurable field.
Resolution
Select the entity name, i.e. "Opportunity" instead of "Opportunity Lookups", for creating code and text fields.
Additional notes
Actions menu should not be available when a lookup is selected from the list. The behavior of displaying the Actions menu has been acknowledged as defect and will be fixed in a future release.