Automatically create new objects in M-Files when your defined trigger happens. Define what will be created, what the properties are and under which conditions are object(s) created.
Configuration #
- Open M-Files Admin
- In the left-side tree view, expand the desired connection to M-Files Server.
- In the left-side tree view, expand the Document Vaults node.
- Still, in the left-side tree view, expand the vault where you installed the connector and select Configurations.
- Expand Other Applications
- Expand Extension Kit
- Click on Object creation
Field Description #
Name | Value | Description |
Enabled | Yes/No | Specifies whether the module is in use. |
Configuration mode | Simple/Advanced | Display simple or advanced configuration options for module. |
Rules > Rule [n] | ||
Name | Text | Custom rule name. |
Description | Text | Optional rule description. |
Enabled | Yes/No | Specifies whether the rule is in use. |
Configuration mode | Simple/Advanced | Display simple or advanced options for rule. |
Trigger | One of the following: • ObjectCreated • ObjectChanged •ObjectEnteredState • OnComment • Scheduled • RunOnce | Type of event that triggers the execution of this rule. ObjectCreated. If this option is selected, rule will be executed when the source object is created. ObjectChanged. If this option is selected, rule will be executed when any change is made to the source object ObjectEnteredState. If this option is selected, rule will be executed when the source object has entered a new state. OnComment. If this option is selected, rule will be executed when the source object has new comment. RunOnce. If this option is selected, rule will be run only once and on all matching objects in vault. NOTE: On vault restart, all enabled rules with Run once trigger will be run immediately. |
Error handling behavior | Error handling behavior | Displayed only if [Advanced] is selected as Configuration mode. Define how errors are handled. Continue will log errors and continue execution. Suspend transaction will rollback all and show error massage. |
Execution mode | One of the following. • EventHandler • Background | Displayed only if [Advanced] is selected as Configuration mode. EventHandler. Rule will be executed in event handler for configured event. Background. Rule will be executed in background, after the event has occurred. |
Search timeout (second) | Integer | Search timeout in seconds. |
Business critical | Yes/No | If set to true, rule will be logged in SEQ. |
Update metadata in file | Yes/No | When object metadata is changed it will be automatically updated in document associated with it. All changes will be available in preview card with no need for check out. |
Rules > Rule [n] > Trigger source | ||
Object Type | List of object types | Object type of source object. |
Class | List of classes | Class of source object. |
Workflow | List of workflows | Workflow of source object. |
State | List of workflow states | Workflow state of source object. Note! If you have entered a state, you must also enter the workflow above. |
Rules > Rule [n] > Trigger source > Search filters > Filter [n] | ||
SearchConditions | Search conditions | Optional additional conditions that source object needs to satisfy. Conditions inside a single filter are combined with AND, while multiple filters are combined with OR operator. |
Rules > Rule [n] > New objects > New object [n] | ||
Type | One of the following: • Manual • FromTemplate | Type of creation of new object. Manual. When this option is selected, new object will be created as empty object. FromTemplate. When this option is selected, new object will be created from template (any existing object can be used as a template). Note that template can be any arbitrary object, it does not need to be marked as template in M-Files in order to be used as object creation template. |
Object type | Object type | Type of created object. |
Object class | Object class | Displayed only when rule type is Manual. Object class of new object that will be created with this rule. |
Template type | One of the following: • Source • StaticObject •ReferenceOnSource • SearchResult | Displayed only when Type is FromTemplate. |
Template property | Property definition | Displayed only when Type is FromTemplate and Template type is ReferenceOnSource. Property on source object that contains reference on template object. |
Properties for removal | Property picker | Displayed only when Type is FromTemplate. Properties from the template that will be removed from object when created. |
Template object | Object picker | Displayed only when Type is FromTemplate and Template type is StaticObject. Object Type and ID of template object. |
Rename template files | Yes/No | Displayed only when Type is FromTemplate. Rename those template files whose name is equal to template’s title to new object’s title. |
Rules > Rule [n] > New objects > New object [n] > Template Object | ||
Object Type | Object type | Object type of template. |
ID | Integer | Object template ID |
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] | ||
Property | Property definition | Property from source object that will be set on new created object. |
Value type | One of the following: • Value • Function | Controls how the value of property will be calculated: directly by copying value from source or as function of selected property values. |
Value from | One of the following: • Source • VaulSearch | Whether to get property value to use in new property dynamic expression from trigger source or from vault. |
MultiSelectLookup Behaviour | One of the following: • Overwrite • Append | Displayed only when Value Type is Value. If property is multi select lookup, this setting controls how the selected value will be added: overwriting existing ones, or appending. |
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function | ||
Functions group | One of the following: • Text • Date • Numeric • Regex | Type of function that will be used to calculate property value. |
Function | When Functions group is Text, one of the following: • Concatenate • ToLower • ToUpper • ToLowerInvariant • ToUpperInvariant When Functions group is Date, one of the following: • Add Hours • AddDays • AddMonths • AddYears When Functions group is Numeric, one of the following: • Sum • Subtract • Multiply • Divide • Average • Percent | Function that will be used to calculate property value. |
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Function > Parameters | ||
Parameter type | One of the following: • Property • Constant | Type of parameter to use in function. |
Property | Property definition | Displayed only when Parameter type is Property. Property whose value will be used in function. |
Constant | Constant value | Displayed only when Parameter type is Constant. Constant value that will be used as parameter in function. |
Rules > Rule [n] > New objects > New object [n] > Properties > Property value [n] > Value | ||
Mode | One of the following: • Dynamic value • Static value • Empty value | Dynamic value. If this option is selected, expected value will be read from source object. Static value. If this option is selected, expected value will be the specified constant. Empty value. If this option is selected, expected value will be empty. |
Static value | Placeholder editor | Displayed only when Mode is Static value. Expected value of selected property. |
Dynamic value | Placeholder editor | Displayed only when Mode is Dynamic value. Expected value of selected property. Any property placeholders will be expanded to specified property values from source object. |
Rules > Rule [n] > New objects > New object [n] > Add source reference on new object | ||
Property | Property definition | Property on search result object in which reference to new object will be stored. |
MultiSelectLookup Behaviour | One of the following: • Append • Overwrite | Append. Reference will be appended to selected multi-select lookup property. Overwrite. Reference will overwrite any existing value in selected multi-select lookup property. |
Rules > Rule [n] > New objects > New object [n] > Add new object reference on source | ||
Property | Property definition | Property on search result object in which reference to new object will be stored. |
MultiSelectLookup Behaviour | One of the following: • Append • Overwrite | Append. Reference will be appended to selected multi-select lookup property. Overwrite. Reference will overwrite any existing value in selected multi-select lookup property. |
Rules > Rule [n] > New objects > New object [n] > Add new object reference on search result | ||
Property | Property definition | Property on search result object in which reference to new object will be stored. |
MultiSelectLookup Behaviour | One of the following: • Append • Overwrite | Append. Reference will be appended to selected multi-select lookup property. Overwrite. Reference will overwrite any existing value in selected multi-select lookup property. |
Rules > Rule [n] > New objects > New object [n] > Advanced settings | ||
Iterator property | Property definition | Property on source to use as iterator for creating new objects. For example, if Assigned to is used as iterator, new object will be created for each assignee. |
Iterator item property | Property definition | Property on new object that will store current iterator item. |
Iterator index property | Property definition | Property on new object that will store index of current iterator item. Index numbering starts at 1. |
Rules > Rule [n] > Vault search > Search [n] | ||
Search result type | One of the following: • Any • None | Any. When this option is selected and at least one search condition is set, rule will be executed only if the vault search result has at least one matching result. None. When this option is selected and at least one search condition is set, rule will be executed only if the vault search result doesn’t have any matching results. |
Rules > Rule [n] > Vault search sort | ||
Sort by | Property definition | Property conditions for vault search. |
Sort direction | One of the following: • Ascending • Descending | Ascending. If this option is selected, search result will have ascending order. Descending. If this option is selected, search result will have ascending order. |
Rules > Rule [n] > Vault search > Search [n] > Conditions > Property Condition [n] | ||
Property | List of property definitions | Property whose value condition will be checked. |
Operator | One of the following: • = • != • > • < • >= • <= • Contains • DoesNotContain • StartsWith • DoesNotStartWith | Operator to apply in comparison of actual and expected property value. |
Rules > Rule [n] > Vault Search [n] > Conditions > Property Condition [n] > Value | ||
Mode | One of the following: • Dynamic value • Static value • Empty value | Dynamic value. If this option is selected, expected value will be read from source object. Static value. If this option is selected, expected value will be the specified constant. Empty value. If this option is selected, expected value will be empty. |
Static value | Placeholder editor | Displayed only when Mode is Static value. Expected value of selected property. |
Dynamic value | Placeholder editor | Displayed only when Mode is Dynamic value. Expected value of selected property. Any property placeholders will be expanded to specified property values from source object. |
Advanced settings | ||
Time to wait (milliseconds) | Integer | Number of milliseconds to wait before executing any rule in background. |
Number of retries | Integer | Maximum number of times COM errors are retried. |
Retry interval (milliseconds) | Integer | Number of milliseconds to wait between retries. |
Use Cases #
Create Agreements (NDA), Statements, when person is hired #
Customer is large IT company and they are using M-Files HR solution. When their candidate is hired, entered the Active state Picture 1, M-Files automatically creates NDA and Statement.

For each document they have defined templates in M-Files, Picture 2.

Employee object is created (Picture 3) and when it goes through workflow. When its entered Active state, two new documents will be created.

Configuration of Object creation #
Source object that trigger creation of NDA and Statement is Employee. Both objects will be created from templates and required properties is Employee, Picture 4.

Documents Names are automatically calculated of Class and Employee, so we will need to add set Employee property.


On a statement, we would like to add Current position, so configuration is like on Picture 7.

Now when Employee is in active state, two documents are created, Picture 8.

Create Tasks when a project is created #
Customer is using M-Files for Project Management. When Project is created, few specific tasks are created to project manager.

Creating copy of object and properties in new class and making copies of attachments and editing references on both ends. #
Source object that triggers the creation of Financial report is Incoming mail, which Text property has value “Financial report”. New object will be created from template (source object), Picture 10.

After the new Financial report is created, copies of attachments are created and references are edited on Financial report and on attachments, as seen in the Picture 11.
