Overview
Symptoms
- Unable to delete object type from M-Files Admin even though objects of this type cannot be found in the vault
- Present or past connect to external database
- References to objects in other vaults according to https://m-files.com/user-guide/latest/eng/relationships_between_objects_in_separate_vaults.html?hl=related%2Cobject%2Canother%2Cvault
- CoSnapInComponent.cpp, 210, You cannot delete this object type because objects of this type exist. Destroy the objects first. (0x80040423)
Item_ObjectType.cpp, 659, You cannot delete this object type because objects of this type exist. Destroy the objects first. (0x80040423)
RPCMethodCallWithRetry.h, 177, You cannot delete this object type because objects of this type exist. Destroy the objects first. (0x80040423)
RPCMethodCallWithRetry.h, 177, You cannot delete this object type because objects of this type exist. Destroy the objects first. (0x80040423)
RPCObjectTypesAdmin.cpp, 1936, You cannot delete this object type because objects of this type exist. Destroy the objects first. (0x80040423)
RPCObjectTypesAdmin.cpp, 315, You cannot delete this object type because objects of this type exist. Destroy the objects first. (0x80040423)
(M-Files 19.2.7378.3)
Solution
First we need to determine if there are objects of this type that may be deleted or hidden in some other way. Try the following:
- Make sure user is logged in with an account that has "Full control of vault" and is a system admin
- Make sure you are logged into the correct vault by comparing GUIDs from M-Files Admin and the Desktop Connections
- Make sure you uncheck the "Deleted" flag so you are searching for deleted and non-deleted files/objects
If the above does not resolve the issue, you may have the following case. This case occurs when you have historical versions of a document that referenced an object. The easiest way to find instances such as this is to perform a search along properties that point towards the object type where "ObjectType 'is not empty'" and make sure you check the box under Additional Conditions that says "Look in the metadata of all versions (does not apply to quick search)". This will let you search in historical version of objects that may references these objects. The only resolution, would be to make a copy of these objects, and then destroy the originals to remove references to these object types. Only once all references have been removed can you then delete the object type from the M-Files Admin.
