Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home

Compliance Kit - Managed Properties - "Script is being executed…" error in checkout or check-in

Last updated on 21 March 2025

Managed Properties (Compliance Kit)

Overview

The following error message may be an indication of attempting to modify rights in checkout:

VaultScriptSessionTemplates.cpp, 328, Script execution failed. ((AfterCheckOut::MFiles.ComplianceKit.MFEventHandlerAfterCheckOut: {OBJECT ID}-{OBJECT VERSION}.)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 328, Operation not allowed. Script is being executed for the object "{OBJECT ID}". (0x80040834)

…
ManagedPropertiesModule.cs, 397 (IL:68), Operation not allowed. Script is being executed for the object "{OBJECT ID}". (0x80040834)

This can also trigger in check-in. This can happen when a document has been checked out, then checked in without any modifications. This actually causes an Undo checkout when M-Files restores the previous version, and can cause a similar error message.

Solution

If you get the above errors when triggering something managed by the Compliance Kit - Managed Properties module, please check the following possible cause first:

M-Files Server prevents any modifications to object access rights during checkout. So, let us assume that you have a value list item that sets permission to the object referring to this value list item. Then you have a managed properties rule that attempts to set this value list item, effectively changing the document rights. Managed Properties are triggered by default in checkout.

This is not possible, and you will end up with an error stack containing the above rows. 

A workaround for this issue exists, but please note that it will affect all managed properties in the vault.

Compliance Kit 19.3.810.52 and newer include a feature for calculating automatic values only in check-in ("Only Calculate on Check-in", in the managed properties configuration screen in M-Files admin).

When this option is enabled, the managed properties will no longer trigger in checkout, effectively working around the issue. But, as mentioned, this affects all managed properties and can lead to metadata cards not having the most up-to-date information as it is calculated in check-in.
 

Still need help?

On this page