ObjectSaveAs

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

Purpose

Copies an object to a new key code that does not exist in the database.

Syntax


Dim variable As Long = ObjectSaveAs(Symbol,SourceObject,TargetObject)

Arguments

Part Description
Symbol Type of object. Use empty quotation marks for the current symbol for the workflow, or the new object.
SourceObject Object to be copied. Use empty quotation marks for the current object for the workflow or the new object for the copy method.
TargetObject Key code of the new object that is copied from SourceObject. This object must not exist before you run the workflow or copy method.

Description

ObjectSaveAs copies an existing object keycode to a new object keycode. The new object keycode does not exist in the database before you run the workflow or copy method.

Example

In this example, formula PIZZASAUCE\003.002 and item OLIVE_OIL_BULK do not exist in the Optiva database before you run the workflow or copy method.


Dim lSave As Long = ObjectSaveAs("FORMULA","SAUCE\003","SAUCE\003.002")
Dim lSaveItem As Long = ObjectSaveAs("ITEM","OLIVE_OIL","OLIVE_OIL_ BULK")