Home
About
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/Common problems

Mass deletion of External Object Type in M-Files

Last updated on 9 December 2024 · 2 min read

Admin
Connections to External Databases (Integrated)

Overview

This article discusses the case where users notice a mass deletion of objects in M-Files with Connections to External Databases for Object Types they belong to. 

A full refresh detects new items, compares and updates existing items, and deletes items that have disappeared from the external database.

The items that have disappeared from the external database will be marked as deleted in M-Files, you will also see:

  • an "Object deleted" event in the vault event log by the user (external source).
  • "No matching extObj for object ID X" in the External Object Type logs.
  • If you have notification set for that event you will receive a notification like: The user (external source) deleted the following object:…

Solution

The source database for the external Object Type data needs to be checked. If these databases are some "intermediate" databases which collect data from other sources, the data in the table must always be complete and valid. When the data in the table is updated, it must happen within a single transaction. 

The problematic comes from the fact that M-Files may begin reading this database at any given time. If the data is not valid or complete, then M-Files reads what there is at that time and if the data omits records, those will get deleted from M-Files.

Therefore, it is mandatory that all changes to the external database are made within a single transaction. Do NOT do it like this:

  1. Delete from…
  2. insert into.... 

But do it like this:

  1. begin transaction
  2. delete from
  3. insert into
  4. commit/rollback.

Additionally, you can specify whether empty record sets are processed or not under Advanced Vault Settings Configuration>Connections to External Databases> Process Empty Record Sets. 

Still need help?

On this page