RemoveDocuments

You can use this function for Optiva Workflows and Copy Methods.

Purpose

Removes all document attachments and any document text from an object.

Syntax


Dim variable As Integer = RemoveDocuments(Symbol,ObjectKey[,ExcludeFunctionCodes])

Arguments

Part Description
Symbol Type of object. Use empty quotation marks to indicate the symbol of the object for the workflow, or the new object for a copy method.
Object Object whose document attachments are removed. Use empty quotation marks to indicate the object for the workflow, or a new object for a copy method.
ExcludeFunctionCodes Comma delimited list of functions from which document attachments should not be removed.

Description

RemoveDocuments removes all document attachments and any document text from an object.

Examples

In this example, all of the document attachments in the PIZZA_SAUCE\003 formula are removed.


Dim iRemove As Integer
RemoveDocuments("FORMULA","PIZZA_SAUCE\003")

You can remove all document attachments from the PIZZA_SAUCE\003 formula, except instructions and attachments to the safety function code. To do so, specify INSTRUC and SAFETY as excluded function codes.


Dim iRemove As Integer
RemoveDocuments("FORMULA","PIZZA_SAUCE\003","INSTRUC", "SAFETY")

In the next example, all of the document attachments are removed from the workflow or newly-created object.


Dim iRemove As Integer = RemoveDocuments("","")