RemoveRefCodes
You can use this function for Optiva Workflows and Copy Methods.
Purpose
The function RemoveReferences removes some or all references from the References tab of an object.
Syntax
RemoveReferences(string objSymbol, string objectKey, string type = null, string code = null)
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: The object type or current object type of the data.
|
objkey |
The object key or current object key of the data.
Note: The object type or current object type of the data.
|
type |
Optional - Reference Type. If argument is empty, all references are removed. |
code |
Optional.
|
Description
RemoveRefCodes removes the Reference Code and Reference Status Code of each object listed on the References tab of the workflow’s object. This does not remove the actual object from the References tab; the function only removes the Reference Code and Reference Status Code.
Examples
This example removes the reference code and reference status code of each reference of the PIZZASAUCE\003 formula.
Dim lRemove As Long
RemoveRefCodes("FORMULA","PIZZASAUCE\003")
The next example removes the reference code and reference status code of each reference of the workflow’s or copied object.
Dim lRemove As Long = RemoveRefCodes("","")
Example 1: RemoveReferences("", "", "VENDOR");
All of the VENDOR references are removed from the current object upon which the workflow is launched.
Example 2: RemoveReferences("", "", "SPECIFICATION");
All the specification references are removed from the current object upon which the workflow is launched.
Example 3: RemoveReferences("FORMULA", "PIZZA_SAUCE\0001");
All the references from PIZZA_SAUCE\0001 formula are removed.
Example 4: chepand RemoveReferences("FORMULA", "PIZZA_SAUCE\0001", "LABELCONTENT", "LC0001\0001");
The Label Content reference LC0001\0001 is removed from PIZZA_SAUCE\0001 formula.