Welcome to Expert Tips — a growing collection of practical tips and real-world examples to help you get the most out of Extension Kit Core.
This page focuses on the Object Operations module group, which includes the following modules: Object Operations, Object Templates, Extended Assignments, Validation, Versioning, and Extended Permissions.
To get a new expert tip delivered to your inbox every week, subscribe to the Tip of the Week newsletter here.
Automate object creation from multi-select properties
Automate object creation from multi-select properties #
This tip explores how to automatically create objects in M-Files based on values selected in a multi-select property. It’s a great way to streamline your workflows and eliminate repetitive manual work.
Example
Let’s say you have a Project object with these properties: Name, Budget, Deadline, and a multi-select Task list template for creating objects.
Each project may include several tasks – and you want each of them to be managed as a separate object. Instead of creating those task objects manually, you can automate this process with Extension Kit Core.
Configuration steps
Use advanced configuration mode in the Object Operations module to set up a rule that creates a new object for every selected task in the Task list (Picture 1).
- Action type: Set the action type to Create to generate new objects.
- New object setup: In the New objects section, define the Object type, Object class, and any relevant properties for the new object.
- Advanced settings: Under New objects → Advanced settings, you must specify the following to ensure each task is processed individually:
- Iterator property: Specify the property on the source object that serves as an iterator. In this case, the Task list property acts as the iterator, as new objects need to be created for each selected task.
- Iterator item property: Specify the property where the current task value should be stored in the new object, e.g. a Task Name.
- Iterator index property: Specify the property on the new object that will store an index of the current iterator item. In this example, the index is stored in the Iterator property on the OT Task.
- Execution mode: Set it to Background or BackgroundTransaction to ensure the rule runs smoothly in the background.

The result in M-Files
Let’s say you select ten tasks in the Task list of your Demo Project (see Picture 2).

Once the rule is triggered, 10 individual Task objects are automatically created – one for each selected task (see Picture 3). This setup saves time, reduces errors, and ensures every task is properly tracked in M-Files.

Automating object creation based on a multi-select property is a simple but powerful way to reduce manual effort and enhance overall efficiency in M-Files.
Creating error messages in the Validation module
Creating error messages in the Validation module #
In the Validation module, error messages can be defined in two places, and it’s helpful to understand how they work together.
1. The general error message
This message is set at the module level and will appear whenever any condition in a Validation rule is not met for an object. The default text is Validation failed, but you can customize it as needed (Picture 1).

2. The custom rule-specific message
Optionally, within each Validation rule, you can specify a custom error message that appears below the general error. Note: The configuration mode within the Property validation rules section needs to be set to Advanced (Picture 2).

The result
As a result, the error message will provide both a general alert and a rule-specific explanation for the user (Picture 3).

Summary: How these messages appear together
- The first message (e.g., An error has occurred) comes from the module-level default message and shows for every validation error.
- The second message is specific to the individual rule that failed and explains what exactly went wrong.
To make validation error messages clearer, remember to customize both the default message and the rule-specific messages.
Enforce document creation from templates only
Enforce document creation from templates only #
Sometimes, you may want to ensure that certain documents are created only from templates in M-Files. This helps prevent assigning them to the wrong class, triggering the wrong workflow, or causing execution errors or incorrect assignments.
For example, let’s say you want documents of a specific class, like Report, to be created only through templates. The idea is simple: validate whether a document was created from a template or not.
Here’s how.
Step 1: Add a property to control creation
We’ll use a dedicated property to drive the validation rule.
In the Metadata Card Configuration:
- Add a new property to the class (e.g.,
FromTemplate). - Set its default value to
No. - Hide the property and make it read-only.
With this setup (Picture 1), every new Report document will automatically get FromTemplate = No whenever it’s created via any standard create action in M-Files (and not Create from template).

Next, create a template for the Report class with this property set to Yes (Picture 2).

This means:
- Documents created from a template will have
FromTemplate = Yes. - All other creation methods will result in
FromTemplate = No.
Step 2: Restrict creation to templates
Finally, configure a validation rule (Picture 3) in the Validation module of Extension Kit Core:
- Rule checks if
FromTemplate = Yesfor the Report class. - If not, display an error message and prevent creation.

The result
Users can only create documents of that class through templates. If they try another way, a validation message prevents creation (Picture 4).
