AddReferences
You can use this function for Optiva Workflows and Copy Methods.
Purpose
The AddReferences function is used to create a reference between Optiva objects and links related objects to appear under the References tab of the target object.
Syntax
long AddReferences(string objSymbol, string objkey, string refType, params object[] @params)
Return Value
If the code is successful, a value greater than zero (0) is displayed.
Arguments
| Part | Description |
|---|---|
objSymbol |
The object type or current object type of the data.
Note: Use empty quotation marks to indicate the current symbol of the workflow.
|
objkey |
The object type or current object key of the data.
Note: Use empty quotation marks to indicate the current symbol of the workflow.
|
refType |
The type of object that is referenced. |
params(s) |
The object to be referenced are displayed on the References tab.
Note: You can use the object ID when object code is not used.
|
Description
AddReferences adds objects, as references, to another object. References are listed on the References tab of objects. The system must be configured to allow the reference before using this function. For example, to use AddReferences to reference specifications to formulas, formulas must already be configured to reference specifications.
See the Infor PLM for Process Application Configuration Guide.
Examples
In this example, the PIZZASAUCE\199 and PIZZASAUCE\202 specifications are referenced to the PIZZASAUCE\002 formula.
Dim iAddref As Integer = AddReferences("FORMULA",
"PIZZASAUCE\002","SPECIFICATION","PIZZASAUCE\199","PIZZASAUCE\202")
AddReferences("FORMULA", "PIZZASAUCE\002", "SPECIFICATION", "PIZZASAUCE\199", "PIZZASAUCE\202");
If the formula is the object of the workflow or copy method, then specify empty quotation marks for the symbol and object.
Dim iAddref As Integer = AddReferences("","","SPECIFICATION",
"PIZZASAUCE\199","PIZZASAUCE\202")
In this example, the first statement retrieves the manufacturing item code of the formula. The next line retrieves the object code of the specification. The specification is referenced on the References tab of the item.
The specification is added to the References tab of the formula.
Dim oItem, ospec As Object
Dim iAddref As Integer
oItem = ObjProperty("ITEMCODE")
oSpec = ObjProperty("OBJECTCODE.REF.V\REFITEM3","ITEM",oItem,
"SPECIFICATION",2)
iAddref = AddReferences("","","SPECIFICATION",oSpec)