Frequently Asked Questions
Frequently Asked Questions
Duplicate key error when destroying object
Posted by Mikko Punta (M-Files) on 20 June 2019 10:43 AM

1 Overview

When trying to destroy object, you may get the following kind of error message:
Error 2601, Level 14, State 1, Procedure -, Line 1, Message: Cannot insert duplicate key row in object 'dbo.OBJECTTnnnIS'
with unique index 'IX_OTnnnIS_EXTIDSTAT_EXTID'. The duplicate key value is (5, X). (ERROR: 50000, SQLSTATE: 42000)

2 Workaround

There are two objects with the same external ID (X) in the database and this is causing the issue.
External ID of the object needs to be changed, it needs to be set to unique value. There are two options to do this
1) with API call SetExternalID
2) modify the database, in this case please contact M-Files Support for further instructions.
(0 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako case