Event handlers (IRPCEventHandlersAdmin)

View as Markdown

Reads and replaces the event handlers of a vault or of the server: VBScript code that the server runs when an event occurs.

MFAdmin uses this interface to admininistrate event handlers.

gRPC serviceMFiles.IRPCEventHandlersAdmin
Book and levelAdministration API, specialized
Methods4
Proto filemfiles/IRPCEventHandlersAdmin.proto

Overview

M-Files Admin uses this service for its event handler editor, and vault applications use it to register their own handlers. An event handler is an InternalEventHandler: the event it reacts to (event_type), its position among the handlers of the same event (sort_index), is_active, a description, and the code that the server runs.

The Set methods replace the whole list: read it, change it, and write all handlers back. To keep a handler, send it back with its guid; a handler left out is removed.

Rights. Handler code runs on the server, so writing it needs the right to run code there:

Methods

MethodSummaryFacts
GetServerEventHandlersGets all server-level event handlers, with their code.admin session idempotent
GetVaultEventHandlersGets all event handlers of the vault, with their code.admin session idempotent
SetServerEventHandlersReplaces all server-level event handlers with the given list.admin session idempotent
SetVaultEventHandlersReplaces all event handlers of the vault with the given list.admin session idempotent