Briefcase Events

All of the briefcase event procedures have Briefcase as one of the arguments. The Briefcase argument is an object representing the current briefcase. This object has two properties:

  • Path — The full path to the briefcase file. This property is read-only in all event procedures except BrcEvent_BeforeCreate.

  • TemplateName — The name of the briefcase template from which the briefcase was created. For more information on briefcase templates, see Create And Edit Briefcase Formats.

ClosedBriefcase Event Sequences

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

ClosedAdd to Briefcase event sequence

  1. BrcEvent_BeforeOpen

  2. BrcEvent_AfterOpen

  3. DocGenericEvent_PrepareCommand

  4. BrcEvent_BeforeInclude — Once for each document in the briefcase.

  5. BrcEvent_BeforeWriteProperty — Once for each mapped property in the briefcase.

  6. BrcEvent_BeforeWriteFileProperty — Once for each mapped property in submittal briefcases. Meridian Transmittal Management module only.

  7. BrcEvent_AfterInclude — Once for each document in the briefcase.

  8. BrcEvent_AfterCreateTransmittal — Meridian Transmittal Management module only.

  9. BrcEvent_MatchDocument — Once for each document in the briefcase.

  10. Transmittal_BeforeSelectRecipients — Meridian Transmittal Management module only.

  11. Transmittal_AfterSelectRecipients —Meridian Transmittal Management module only.

  12. BrcEvent_BeforeSend —Meridian Transmittal Management module only.

  13. BrcEvent_AfterSend — Meridian Transmittal Management module only.

  14. BrcEvent_BeforeClose

  15. Transmittal_BeforeUpdateTransmittalDB —Meridian Transmittal Management module only.

  16. Transmittal_AfterUpdateTransmittalDB — Meridian Transmittal Management module only.

ClosedCreate briefcase event sequence

  1. BrcEvent_BeforeCreate

  2. BrcEvent_BeforeOpen

  3. BrcEvent_AfterOpen

  4. BrcEvent_BeforeClose

ClosedImport from Briefcase event sequence

  1. BrcEvent_BeforeOpen

  2. BrcEvent_AfterOpen

  3. BrcEvent_MatchDocument — Once for each document in the briefcase.

  4. BrcEvent_BeforeImport — Once for each document in the briefcase.

  5. BrcEvent_AfterImport — Once for each document in the briefcase.

  6. BrcEvent_BeforeClose

ClosedUnlock from Briefcase event sequence

  • BrcEvent_Unlocked

ClosedAfterCreateTransmittal Event

Occurs after a transmittal document has been created and the transmittal sheet has been generated.

Syntax

BrcEvent_AfterCreateTransmittal(Batch, Briefcase)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

Remarks

Not available in PowerWeb.

ClosedAfterImport Event

Occurs after a document has been imported into the vault from a briefcase.

Syntax

BrcEvent_AfterImport(Batch, Briefcase, Action)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

Action

A long integer that represents one or more AS_BRC_IMPORT_ACTION constants.

Remarks

Not available in PowerWeb.

ClosedAfterInclude Event

Occurs when a document in the current batch has been added to the briefcase.

Syntax

BrcEvent_AfterInclude(Batch, Briefcase, CheckOut)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

CheckOut

True when the user has selected to check the document out to the briefcase. Read-only.

Remarks

Not available in PowerWeb. If you change property values on the document in this event procedure, the status of the document in the briefcase will be Properties Changed.

ClosedAfterOpen Event

Occurs after a briefcase has been opened.

Syntax

BrcEvent_AfterOpen(Briefcase)
Parameters
Name Description

Briefcase

An object that represents the briefcase file. Can be set by the event procedure.

Remarks

Not available in PowerWeb.

ClosedAfterSend Event

Occurs after a briefcase has been sent by email.

Syntax

BrcEvent_AfterSend(Briefcase As Type)
Parameters
Name Description

Briefcase

An object that represents the briefcase file. Can be set by the event procedure.

Remarks

Not available in PowerWeb.

ClosedAfterReadProperty Event

Occurs when a value for a mapped property has been read from the briefcase and is about to be written to the vault.

Syntax

BrcEvent_AfterReadProperty(Batch, Briefcase, PropertyName, Value)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

PropertyName

A string that contains the name of the Meridian property being written. Read-only.

Value

The value of the property being written. This value can be changed in the event procedure. The changed value is then written to the vault.

Remarks

Not available in PowerWeb.

ClosedBeforeClose Event

Occurs when a briefcase is about to be closed.

Syntax

BrcEvent_BeforeClose(Briefcase As Type)
Parameters
Name Description

Briefcase

An object that represents the briefcase file. Can be set by the event procedure.

Remarks

Not available in PowerWeb.

ClosedBeforeCreate Event

Occurs when the user clicks the Create Briefcase button. Its primary purpose is to allow the user to enter a default name for the briefcase file.

Syntax

BrcEvent_BeforeCreate (Briefcase, Abort)
Parameters
Name Description

Briefcase

An object that represents the briefcase file. Can be set by the event procedure.

Abort

Setting this Boolean argument to True aborts the operation. The event will not occur.

Remarks

During this event, if the current object is a folder, the Folder object refers to that folder. If the current object is a document, the Folder object refers to the parent folder.

When the value of Briefcase.Path is set in this procedure, the user is not prompted as usual to select a path and name for the new briefcase. Also, the file extension in the Path property will determine the briefcase file format. The format definition with the name that matches the file extension will be used regardless of the Format setting of the template that is specified in the Briefcase.TemplateName property. Consequently, there should only be one format defined for each potential archive file extension and the format definition name should be the same as the file extension.

For more information on briefcase formats and templates, see Create And Edit Briefcase Formats.

Not available in PowerWeb.

ClosedBeforeImport Event

Occurs when a document is about to be imported into the vault from a briefcase.

Syntax

BrcEvent_BeforeImport(Batch, Briefcase, Action)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

Action

A long integer that represents one or more AS_BRC_IMPORT_ACTION constants.

Remarks

Not available in PowerWeb.

The Action parameter can be changed in this event procedure and the action executed by Meridian will be changed accordingly.

Note:

Use the object argument Batch.Argument("__$$RelatedVaultDocument") to relate an incoming file from a briefcase to an existing vault document. For more information, see Object Arguments.

ClosedBeforeInclude Event

Occurs before each document in the current batch is added to the briefcase.

Syntax

BrcEvent_BeforeInclude(Batch, Briefcase, CheckOut)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

CheckOut

True when the user has selected to check the document out to the briefcase. Read-only.

Remarks

Not available in PowerWeb. The value of CheckOut can be changed in this event procedure. If it is set to False, the document will only be included in the briefcase (even if the user has selected to check it out). If it is set to True, the document will be checked out to the briefcase.

ClosedBeforeIncludeFile Event

Occurs when one or more files is about to be added to a briefcase.

Syntax

BrcEvent_BeforeIncludeFile(Batch, Briefcase, File, ReadOnly)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

File

The file name about to be added to the briefcase.

ReadOnly

Boolean value that indicates if the file is under change.

Remarks

Not available in PowerWeb.

ClosedBeforeOpen Event

Occurs when a briefcase is about to be opened.

Syntax

BrcEvent_BeforeOpen(Briefcase, Abort)
Parameters
Name Description

Briefcase

An object that represents the briefcase file. Can be set by the event procedure.

Abort

Setting this Boolean argument to True aborts the operation. The event will not occur.

Remarks

Not available in PowerWeb.

ClosedBeforeSend Event

Occurs when a briefcase is about to be sent by email.

Syntax

BrcEvent_BeforeSend(Briefcase, Abort)
Parameters
Name Description

Briefcase

An object that represents the briefcase file. Can be set by the event procedure.

Abort

Setting this Boolean argument to True aborts the operation. The event will not occur.

Remarks

Not available in PowerWeb.

ClosedBeforeWriteFileProperty Event

Occurs during creation of a submittal before a file is added to the briefcase.

Syntax

BrcEvent_BeforeWriteFileProperty(Batch, Briefcase, File, PropertyName, Value)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

File

The file name about to be added to the briefcase.

PropertyName

The property name to set with Value.

Value

The value to set to PropertyName.

Remarks

Not available in PowerWeb. Use this method to modify the briefcase property values of documents as they are added to the submittal.

ClosedBeforeWriteProperty Event

Occurs when a value for a mapped property is about to be written to the briefcase.

Syntax

BrcEvent_BeforeWriteProperty(Batch, Briefcase, PropertyName, Value)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

PropertyName

A string containing the name of the Meridian property to be written. This parameter is read-only.

Value

The value of the property. The event procedure can change this parameter. The changed value will then be written to the briefcase.

Remarks

Not available in PowerWeb.

ClosedMatchDocument Event

Occurs after the Import from Briefcase dialog box is shown by the View Briefcase dialog box and occurs for each file in the briefcase.

Syntax

BrcEvent_MatchDocument (Batch, Briefcase, DocumentID)
Parameters
Name Description

Batch

An object that represents the files contained within the briefcase.

Briefcase

An object that represents the briefcase file.

DocumentID

ID of the vault document to match to the current briefcase record. If one is found, then upon input it contains the ID. If a match could not be found using built-in Meridian logic, then it is empty and the user-defined logic in the event handler can help find a match.

Remarks

Not available in PowerWeb.

Use this method to match vault documents to files within a briefcase for which the existing metadata is insufficient. The current briefcase metadata record is available as a Briefcase.CurrentRecord property object.

Note:

Implementing this event will delay the opening and refreshing of the briefcase dialog box.

Example

This example searches for vault documents with the same name as in the briefcase and that have a value of Work in Progress for the property SYS.Rootbranch.

Sub BrcEvent_MatchDocument(Batch, Briefcase, DocumentID)
    Dim strFileName  'The filename we are looking for
    Dim objDocsFound 'Result of search
    Dim arrFindCriteria
    
    If Len (DocumentID) = 0 Then
        strFileName = Briefcase.CurrentRecord.Filename  
        arrFindCriteria = Array(_
            Array("SYS.Rootbranch", IC_OP_EQUALS, "Work in Progress"))
        Set objDocsFound = Vault.FindDocuments(strFileName, Empty,_
            arrFindCriteria, False)
        
        If objDocsFound.Count > 0 Then
            DocumentID = objDocsFound.Document(0).ID
        End If
    End If
End Sub

ClosedUnlocked Event

Occurs after a document is unlocked from a briefcase.

Syntax

BrcEvent_Unlocked(Batch, Briefcase)
Parameters
Name Description

Batch

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

Briefcase

An object that represents the briefcase file.

Remarks

Not available in PowerWeb. This event occurs when a document is unlocked automatically (for example, when a document is checked in or is deleted from a briefcase) and when a document is unlocked manually. When the document is unlocked from a briefcase from within PowerUser or the View Briefcase dialog box, the Briefcase argument is NULL.

2023