With event handlers you can define different operations that are executed when
certain events occur, such as after an object is modified or before a new value list
item is created, and so on. The operations are specified using variables, generic
features of VBScript, and M-Files API.
Examples of event handler use:
- Object permissions can be set to change
automatically when the object properties are changed.
- Certain basic documents can be added to
every new project via a pre-defined project model.
- Specified Word documents can always be
saved as PDFs, so that when a Word file is checked in, it is saved to the server
in PDF format as well.
- Data related to photos, such as date
and image size, can be automatically added to the metadata of the photo
document.
- If the user adds a new value to the
value list, the event handler can be used to check that the added value is
entered correctly.
- Logging in to M-Files can be prevented
outside working hours, for instance during night time and weekends.
- Downloading certain files can be
monitored, downloading large numbers of files can be prevented, or an alarm of
suspicious downloads can be sent to the administrator.
Note: The documentation for the M-Files API is located in . For more information about VBScript code and M-Files API, go to
www.m-files.com/api. Instructions on writing VBScript code and working with the
M-Files API are available for a separate fee from M-Files customer support (
[email protected]).
Do the following steps to create a new event handler: