Client-side Events
enaio® client runs VBScripts once the assigned event takes place. Select an event and create the VBScript code. Events may need a return value that will be written to the handoff file.
Client events are divided into the following groups:
-
Application
Events related to enaio® client.
-
Data sheet
Events related to the data sheets of objects that are newly created or whose index data is modified.
-
Hit list
Events related to hit lists that result from searches or content lists of folders and registers.
-
Query
Events related to search forms.
-
Cabinet
Event for drag and drop for moving documents into a folder.
The following client-side events are available:
Event |
Reference |
Time of the execution |
Description of the return value |
Event code |
---|---|---|---|---|
AfterLogin |
Application |
After the user has logged in |
No return value |
8 |
BeforeLogout |
Application |
Before the user has logged out |
1 = logout will be performed 0 = logout will not be performed |
9 |
OnStartApp |
Application |
After enaio® client has been started, immediately before 'AfterLogin' |
no return value |
14 |
OnCloseApp |
Application |
After check in of all documents, before exiting enaio® client |
1 = exit will be performed 0 = exit will not be performed |
15 |
BeforeLink |
Application |
After having created a link in enaio® client, before the data will be passed to the server |
0 = create link Every non-zero value will cancel the process. |
21 |
AfterLink |
Application |
After the server has created the link |
no return value |
22 |
BeforeDeleteLink |
Application |
After having deleted a link in enaio® client, before the data will be passed to the server |
0 = delete link -2 = process will be canceled Other values will cancel the process of deletion; it will be continued with the next selected object. |
23 |
AfterDeleteLink |
Application |
After the server has deleted the link |
no return value |
24 |
StartAction |
Application |
Call with server notification |
no return value |
31 |
OnClickItem |
Data sheet |
After a button was clicked |
1 = data will be imported from the handoff file to the data sheet 0 = data of the data sheet will not be modified |
13 |
OnShow |
Data sheet |
Before opening the data sheet The handoff file contains the following entries: 'Action=NEW' if a data sheet is opened for new creation, 'Action=UPDATE' if a data sheet is opened for editing, 'Action=READONLY' if a data sheet is opened in read-only mode, 'Action=REQUEST' if a search form is opened. |
1 = data will be imported from the handoff file to the data sheet 0 = data of the data sheet will not be modified -1 = data sheet will not be opened |
1 |
BeforeValidate |
Data sheet |
After 'Save' was clicked, before the validity check by enaio® client and saving. The handoff file contains the following entries: 'Action=NEW' if an object is created or 'Action=UPDATE' if data are edited. |
1 = data will be imported from the handoff file to the data sheet Afterwards, enaio® client performs the validity check and saves the data. 0 = the data sheet will be saved but the data of the handoff file will not be imported to the data sheet -1 = creation or modification of data will be canceled -2 = data will be imported from the handoff file to the data sheet, the data sheet will remain open, data will not be saved |
2 |
AfterValidate |
Data sheet |
After the validity check in enaio® client and before saving The handoff file contains the following entries: 'Action=NEW' if an object is created or 'Action=UPDATE' if data are edited. |
1 = data will be imported from the handoff file to the data sheet 0 = the data sheet will be saved but the data of the handoff file will not be imported to the data sheet -1 = creation or modification of data will be canceled -2 = data will be imported from the handoff file to the data sheet, the data sheet will remain open, data will not be saved |
36 |
AfterSave |
Data sheet |
After the validity check in enaio® client and saving The handoff file contains the following entries: 'Action=NEW' if an object is created or 'Action=UPDATE' if data are edited. |
no return value |
3 |
BeforeCancel |
Data sheet |
After the 'Cancel' button was clicked on a data sheet |
0 = the data sheet will not be closed. The data sheet will be closed if other return values are used. |
30 |
OnEnterPage |
Data sheet |
When switching the page of the 'Pagecontrol' dialog element |
1 = data of fields on the page control that are part of the handoff file will be returned to the search form 0 = data of the handoff file will be ignored |
25 |
OnLeavePage |
Data sheet |
When leaving a page of the 'Pagecontrol' dialog element |
No return value |
37 |
OnFocusGained |
Data sheet |
When the focus is on a text box. The event can be assigned to every text box of a data sheet. |
no return value |
32 |
OnCellFocusGained |
Data sheet |
When the focus is on a table cell. |
no return value |
39 |
OnValueChanged |
Data sheet |
When the entry in a field was completed and the field – for catalogs and add-ons of the dialog – has been exited. |
0 = no change -1 = back to the text box, the entry is not changed 1 = data will be imported from the handoff file to the text box |
33 |
OnCellValueChanged |
Data sheet |
When the entry in a table cell was completed |
0 = no change -1 = back to the text box, the entry is not changed 1 = data will be imported from the handoff file to the text box |
40 |
BeforeAddRow |
Data sheet |
Before a new row is added in a table. |
0 = no change -1 = row is not added |
34 |
BeforeDeleteRow |
Data sheet |
Before a row is deleted in a table. |
0 = no change -1 = row is not deleted |
35 |
BeforeStartQuery |
Query |
After the user clicked 'Start search' on the search form, before the search is actually executed |
1 = data will be imported from the handoff file to the search form enaio® client will then perform the search. 0 = the search will be performed without further modification -1 = the search will be canceled |
4 |
AfterFinishQuery |
Hit list |
After the search |
no return value |
5 |
BeforeDelete |
Hit list |
Before an object is deleted |
1 = deletion will be executed 0 = deletion will not be executed |
11 |
BeforeUndoCheckOut |
Hit list |
Before the 'Undo checkout' user action is applied to a document in enaio® client The 'NumberOfSelectedDocuments' constant can be used to query in the script for how many documents the checkout has been undone. |
-2 = the 'Undo checkout' action will not be available for this document -1 = the 'Undo checkout' action will be canceled for all selected documents 0 = the 'Undo checkout' user action will be performed 1 = the 'Undo checkout' action will be available, no user confirmation required |
27 |
AfterDelete |
Hit list |
After an object was deleted |
no return value |
12 |
BeforeOpen |
Hit list |
Before a document is opened |
0 = do not open 1 = open if checked out, open in read-only mode 2 = open read-only 3 = open if checked out, open in read-only mode with a note -4 = only workflow event: opened object is shown in the document viewer |
16 |
OnMove |
Hit list |
When a document or register is moved within a cabinet |
0, 1 = the document or register will be moved -1 = moving is not carried out |
17 |
OnMoveExtern |
Hit list |
If a document is moved to a different cabinet |
0, 1 = the document or register will be moved -1 = moving is not carried out |
42 |
OnAddLocation |
Hit list |
If a document or register receives another location via drag and drop |
0, 1 = assign location -1 = do not assign location |
18 |
OnCreateCopy |
Hit list |
When a document or register is copied |
0, 1 = the document or register will be copied -1 = the document or register will not be copied |
43 |
BeforeSaveDocument |
Hit list |
Before a document is checked in |
0 = the document will be checked in -2 = the process will be canceled, the document will not be checked in With other return values, the document will not be checked in but the system will continue with the next document. |
19 |
AfterSaveDocument |
Hit list |
After a document was checked in |
no return value |
20 |
BeforeRestore |
Hit list |
Before an object is restored from the recycle bin |
0 = the object is not restored If other return values are used, the object is restored. |
28 |
AfterRestore |
Hit list |
After an object is restored from the recycle bin |
no return value |
29 |
FileDrop |
Cabinet |
After filing files at a location |
-1 = cancellation 1 = client only updates the hit list 0 = client transfers the files |
200 |
Events for Changes in Batch Mode
The following data sheet events are integrated for changes in batch mode:
Event |
Event code |
---|---|
BeforeValidate |
100 |
AfterValidate |
104 |
OnShow |
101 |
OnClickItem |
102 |
OnChangeActivePage |
103 |
Handoff files contain an extra section with the following structure:
[BATCHUPDATE]
Count=<Anzahl der Objekte>
ID0=<Objekt-ID>
IDn= …
Only these events can be deployed for changes in batch mode.
Events for changes in batch mode in enaio® client are also added from the object search over the context menu of an object type.
Events for changes in batch mode are flagged with a lightning symbol in the 'Object search' area.
The function corresponds to those of the events for an object.
If the events 'BeforeValidate' or 'OnShow' are assigned an object type, then changes are only possible for this object type if corresponding change events in batch mode are assigned. The scripts do not need to have any function. Scripts must contain at least one apostrophe as a comment sign so that they are saved.
'StartAction' Event
The 'StartAction' event is called using the 'krn.SendMessageToClients' method. The method can be executed using the enaio® enterprise-manager or from scripts and applications. You can find information about 'krn.SendMessageToClients' in the 'enaio®Server API' documentation.
The event is called using the 'StartEvent' value of the 'Message' parameter. The value of the 'Text' parameter is transferred as an event file and can be evaluated by the script.