BlueCielo Meridian Enterprise 2012 VBScript API Reference | BlueCielo ECM Solutions

You are here: Understanding Meridian event procedures > About the document generic events > DocGenericEvent_*NewDocument events

DocGenericEvent_*NewDocument events

Occur when documents are created by a user. Also when a document is moved to a different folder or changed to a different document type.

Syntax
DocGenericEvent_*NewDocument(Batch, Action, SourceFile, DocType, DocTemplate)
Parameters
Name Description

Batch

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

Action

A long integer that represents one or more AS_IMPORTTYPE constants.

SourceFile

A string that contains the name of the source file imported as the new documents

DocType

An object that represents the document type selected by the user for the new documents.

DocTemplate

A string that contains the name of the document template selected by the user.

Remarks

The Before and After procedures are invoked when documents are imported with the Document Import Tool. The Initialize and Terminate procedures are not invoked by the Document Import Tool. The FailCurrent and Abort methods of the Batch object are also available; however, the BatchIndex property will always be 1.

Example

NEW  You can test the value of the $$ICIMP_PropInvalid batch argument to determine if property validation failed while running the Document Import Tool. If the validation failed, then you can prevent the import of the failed document using code similar to the following example.

Sub DocGenericEvent_BeforeNewDocument(Batch, Action, SourceFile, DocType, DocTemplate)
If CBool(Batch.Argument("$$ICIMP_PropInvalid")) = True Then Batch.FailCurrent("Property validation failed") End If End Sub

Tip    Use the object argument Batch.Argument("__$$RelatedProjectCopy") to obtain the project copy that is being released as a master document. It can be useful to calculate the location for the master document location if it is being created for the first time.

Use the object argument Vault.Argument("__$$RelatedTransmittal") to relate a transmittal to a new submittal.

Use the object argument Vault.Argument("__$$SubmittalSender") to relate a person to a new submittal.

For more information, see Understanding object arguments.

Related concepts

About the document generic events


Copyright © 2000-2012 BlueCielo ECM Solutions

www.bluecieloecm.com