Folder Generic Events

The folder generic events allow you to implement custom functionality for folders, including folder types. Some of the events that apply to folders also apply to documents.

ClosedFolder Generic Event Sequences

The events that occur for the folder generic commands are shown in the following lists in the sequence that they occur.

ClosedChange Folder Type event sequence

  1. DocGenericEvent_PrepareCommand

  2. FolderGenericEvent_InitializeChangeFolderType

  3. FolderGenericEvent_BeforeChangeFolderType

  4. FolderGenericEvent_AfterChangeFolderType

  5. FolderGenericEvent_BeforeNewFolder

  6. FolderGenericEvent_AfterNewFolder

  7. FolderGenericEvent_TerminateChangeFolderType

ClosedDelete Folder event sequence

  1. DocGenericEvent_PrepareCommand

  2. DocGenericEvent_InitializeDelete

  3. DocGenericEvent_BeforeDelete

  4. DocGenericEvent_AfterDelete

  5. DocGenericEvent_TerminateDelete

ClosedNew Folder event sequence

  1. FolderGenericEvent_BeforeNewFolder

  2. DocGenericEvent_OnProperties

  3. FolderGenericEvent_AfterNewFolder

  4. DocGenericEvent_*Rename events — Occurs in PowerWeb only when creating a new folder.

ClosedAfterNewFolder Event

Occurs after a user creates a new folder in the vault.

Syntax

FolderGenericEvent_AfterNewFolder(Batch, Action)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

Action

Long integer that represents one or more AS_IMPORTTYPE constants.

ClosedBeforeNewFolder Event

Occurs before a user creates a new folder in the vault.

Syntax

FolderGenericEvent_BeforeNewFolder(Batch, Action)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

Action

Long integer that represents one or more AS_IMPORTTYPE constants.

Closed*ChangeFolder Events

Occurs when a user changes the folder type of an existing folder.

Syntax

FolderGenericEvent_*ChangeFolder(Batch)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

NewType

A string that contains the name of the new folder type selected by the user. Passed only to the BeforeChangeFolder event.

OldType

A string that contains the name of the original folder type of the folder. Passed only to the AfterChangeFolder event.

ClosedFileUploaded Event

Occurs when a file is uploaded, but before a document is created or updated.

Syntax

FolderGenericEvent_FileUploaded (Batch, FileName As String, FilePath As String, CancelDefault as Boolean)
Parameters
Name Description
Batch The current batch object.
FileName The display name of the uploaded file.
FilePath The local path of the uploaded file on the server PC.

CancelDefault

If set to True, the event is canceled. If set to False, the event is not canceled.

2023