RemoveRefCodes

You can use the RemoveRefCodes function to remove the Reference Code and Reference Status Code associated with objects displayed on the References tab of the specified object. The operation clears reference metadata without removing the reference relationships.

When to use

You can use this function to:

  • Clear Reference Code and Reference Status Code while maintaining reference relationships.
  • Implement workflows that update reference status.

When not to use

You cannot use this function to remove entire reference relationships.

Syntax

long RemoveRefCodes(string objSymbol, string objectKey)

Parameters

Parameter Type Required Description
objSymbol string Yes

The symbol of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
objKey string Yes

The key of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.

Return Value

The application returns a value zero (0 )if the operation is successful.

Impact

  • Removes the Reference Code and Reference Status Code from all references on the References tab.
  • Retains the reference relationships. The object is displayed on the References tab.
  • Immediately persists changes to the database.

Prerequisites

The operation affects all references. You cannot selectively remove codes from specific references.

Examples

Example 1
Removes the reference code and reference status code of each reference of the workflow’s object.
RemoveRefCodes("", "");
Example 2
Removes the reference code and reference status code of each reference of the PIZZASAUCE\003 formula.
RemoveRefCodes("FORMULA", "PIZZA_SAUCE\\003");

RemoveRefCodes vs RemoveReferences

  • RemoveRefCodes: Clears Reference Code and Reference Status Code metadata only. The reference relationship remain.
  • RemoveReferences: Removes entire reference relationships. The objects no longer are displayed on the References tab.