SetLineObject

You can use the SetLineObject function to assign a business object, such as an item, formula, or project, to a specific workflow line. This function allows different workflow steps to operate on different objects. You can use the SetLineIbject.

When to use

You can use this function to:

  • Assign different objects to different workflow steps.
  • Assign objects to workflow lines programmatically based on business rules or conditions.

When not to use

You cannot not use this function when the workflow operates on the same object throughout the process. In this case, use the standard workflow configuration.

\

Syntax

void SetLineObject(string objSymbol, string objKey, int lineId, long wipId);

Parameters

Parameter Type Required Description
objSymbol string Optional

The symbol of the object.

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

The key of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
lineId int No Line ID of the workflow step. If 0, defaults to the current line.
wipId long No Workflow ID. If 0, defaults to the current workflow ID.

Return Value

The application does not return a value.

Prerequisites

The function throws a permission violation when it is used in secured mode.

Examples

Example 1
Assign Object to Current Line.
// Assign specific item to current workflow line
SetLineObject("ITEM", "ITEM-001", 0, 0);
// lineId = 0 (current line), wipId = 0 (current workflow)
MessageList("Assigned ITEM-001 to current workflow line");