CopyRefObjDocuments

You can use this function for Optiva Copy Methods.

Purpose

Copies the text, files and URLs that are assigned to the reference object to the new object.

The two types of objects must have the same function code(s). For more information about creating function codes for attached documents and assigning filters to function codes, see the Infor CloudSuite PLM for Process Application Configuration Guide.

Use ObjPropertySet to include a script with a save mode of 1. This forces the new object to be saved before using the CopyRefObjDocuments function.

Syntax


Dim variable As Long = CopyRefObjDocuments()

Arguments

None

Examples

This script is in a copy method for a specification that is created from the References tab of a formula (Object Type = SPECIFICATION, Reference Type = FORMULA, Events = Create From As New). It copies all of the document attachments from the formula to the specification for function codes that are in common.


Dim lDoc As Long = CopyRefObjDocuments()

Or copy the formula description to the specification description and force a save event. Then, copy all of the document attachments from the formula to the specification for function codes that are in common.


Dim oDesc As Object = ObjProperty("DESCRIPTION", 
CONTEXT._REFOBJECTSYMBOL,CONTEXT._REFOBJECTKEY)
lSetDesc As Long = ObjPropertySet(oDesc,1,"DESCRIPTION", "","")
Set lDoc As Long = CopyRefObjDocuments()