This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Object Type Properties - Connection External Database - Change Object ID

Hello everyone,

We have a Project Object connected to an external Database. We've used the Project Number as the M-Files Object ID.
Unfortunately, we've noticed (a bit too late) that the customer was changing the Project Numbers on the external application which created inconsistent metadata in certain documents. We had documents where the project was removed/deleted because the Object ID was changed from the Project Number.

For example : The project was created in M-Files with Project Number 021004 and the Object ID with the same identifier.
The customer changed the Project Number to 622003 and the reaction on M-Files was that 021004 project was deleted, it only remained a project with the number 622003 without the history before that changement (Creation of 622003 Project)

We've asked the Database Projects Provider to add in the DB's view a unique identifier that we'll use as Object ID in M-Files.

My question is : Changing the object ID will unlink the project in the documents metadata right ? (Project deleted metadata)

Thanks for your answers,
Leitao Claudio

Parents
  • Yes, I have run into an issue like this before where a client was updating a value in their system which was also being used as the object ID in M-Files. If the object ID changes, the impacts in M-Files is that it deletes the object with the initial ID and creates a brand new object with the new ID. Unfortunately I did not find an easy way to fix the items displayed as (Deleted), I ended up writing an external application which connected to the vault and looped through the documents for that class to update the deleted values to reference the correct object ID. 

  • Hello,

    Thanks for your answer. M-Files proposed me exactly the same thing... there is unfortunately no magic way to do that.


    1. Create a new object type for the External Database Connection and get the objects.

    2. You can disable the connection from the old object type so it stays as it is.

    3. Create a script that goes though the bot object types and modifies the new one in the desired way.

    4. Delete the old object type.

    Regards
    Claudio

  • I am aware that there is a rarely-used way to change the column used for the object ID.  You can effectively configure both the "old" and "new" object ID columns, M-Files will ensure that everything is updated, then you can remove the old one.  This should keep the relationships intact.

    However: it is rarely used, and I am aware of at least one partner having an issue with it that meant they had to revert to a backup.  So I would urge caution (and to ensure that you have a good backup, and a tested restore procedure).  I seem to recall that their specific issue was that there was an overlap in the IDs (one of the new ID values was used as an old ID as well) and that caused the problem.

    Support should be able to tell you more.

  • Hi Craig,

    can you share more details how to configure object type to use both new and old object ids? Is there any documentation for this?

    It would interesting to test it at least as those changes can happen in any business.

    Best,

    Dejan

  • We don't have any public documentation, unfortunately.  If you have this requirement then I suggest that you speak to your account manager to see what support we can give you.

    That said: I would highlight that this isn't something that you would want to be doing frequently.  It is a process that I would only do in very limited situations.

Reply Children
No Data