Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Error resolution

M-Files Admin: Error when modifying external object type - 'PK_OBJECTTYPECOLUMNMAPPING' violation

Last updated on 2 July 2025

Admin
Connections to External Databases (Integrated)

Overview

You might see the following kind of error when modifying external object type in M-Files Admin:

Error: Object marked to be available offline (The statement has been terminated. (ERROR: 3621, SQLSTATE: 01000)

Violation of PRIMARY KEY constraint 'PK_OBJECTTYPECOLUMNMAPPING'. Cannot insert duplicate key in object 'dbo.OBJECTTYPECOLUMNMAPPING'. The duplicate key value is (162, 2). (ERROR: 2627, SQLSTATE: 23000)

Solution

Error happens if some column is defined twice in the select statement:

select column1, column2, column3, column2 from test_table

To solve the issue, please remove the duplicate column.

Still need help?

On this page