BatchOpen

This event triggers when a user opens a batch.

Syntax

ScriptModule_BatchOpen(ByVal UserName as String, ByVal BatchDatabaseID as Long, ByVal ExternalGroupID as Long, ByVal ExternalBatchID as String, ByVal TransactionID as Long, ByVal WorkflowType as SCBCdrPROJLib.CDRDatabaseWorkflowTypes, BatchState as Long)
Parameter Description
UserName The user name currently logged in who opened the batch.
BatchDatabaseID The unique batch ID in the database displayed as a numeric value. For the file system, this batch ID is not used.

For example, batch 00000061 returns the value 61.

ExternalGroupID The Group ID assigned to a batch.

The Group ID used with the scripting security methods that enable the developer to assign a batch to a security group. Only those users belong to the same Group ID are able to access batches.

For example, a batch belonging to Group ID 80 is only accessible by a user assigned to group 80.

This ia a read-only field. You cannot modify the values.

ExternalBatchID The External Batch ID assigned to a batch.

The External Batch ID allows the developer to synchronize a newly created batch of documents with another external system, such as archive ID or a storage box ID.

This ia a read-only field. You cannot modify the values.

TransactionID The Transaction ID assigned to a batch.

The Transaction ID allows the developer to synchronize a newly created batch of documents with another external system. For example, an archive ID or a storage box ID.

This ia a read-only field. You cannot modify the values.

WorkflowType

Corresponds to CDRDatabaseWorkflowTypes data type.

BatchState The current status of the batch being opened, such as status 550 (Extraction Verification).

Sample Code

The following sample code logs the Batch ID and User name that opened a batch with date and time.

LogMessage is a custom function that writes a text line into a log file with Date/Time as a prefix.

Private Sub ScriptModule_BatchOpen(ByVal UserName as String, ByVal BatchDatabaseID as Long, ByVal ExternalGroupID as Long, ByVal ExternalBatchID as String, ByVal TransactionID as Long, ByVal WorkflowType as SCBCdrPROJLib.CDRDatabaseWorkflowTypes, BatchState as Long)
   Call LogMessage(BatchDatabaseID & "," & UserName, "C:\EventTrace_Log") 
End Sub

See also