Is it possible to change the document class of existing documents in M-Files with the M-Files importer tool?
Is it possible to change the document class of existing documents in M-Files with the M-Files importer tool?
If you export files, import back with ID's and use special ID (-1003 ?) created for this type of overwrite operations, you should be. You also need to define properties that marked as required in that new class.
I'd do a test with just one document tho.
I have tried with an XML settings file that looks like this:
And the CSV file looks like this (with error message in first column
Have you tried with External ID (-1003) ?
I have tried External ID (-1003) as you recommend and it works partially.
Out of 500 documents, I was able to change the document class of 378 documents, but on 122 of them I get this message in the log:
Cannot replace the existing M-Files object (more than one found).
And that's why we have other object types than documents in our database that have the same ID as a document.
See the example below:
My mapping in the XML file is like this:
In this situation, I know that it is the object type Document that I want to change the class of, so it should be possible to configure the M-Files Importer Tool (XML file) that it is the object type Document that I want to work with so that it does not fail because I have another object type with the same ID as the document.
Do you have any suggestions for a solution?
Can I add something to the Mappings for example that would help me?
maybe you can go for InternalID instead of NameOrDisplayID ? or use the class as duplicate as well ?
I add the property Title (ID 0) and turned on duplicate detection and then it works.
I don't know why this works, but maybe it's because the other object type/types in the database that have the same ID as documents don't have the Title property.
I add the property Title (ID 0) and turned on duplicate detection and then it works.
I don't know why this works, but maybe it's because the other object type/types in the database that have the same ID as documents don't have the Title property.
It works because even if you remove it in your metadata card, M-Files keeps it on background as the name property of the object.
Glad you got it working in a way or another
© 2025 M-Files, All Rights Reserved.