PurchReqExpressionProvider.GetDistance Method [AX 2012]

Gets the distance of the target node from the source node in a hierarchy.

public int GetDistance(
    CLRObject field, 
    RecId target, 
    RecId source)

Run On

Called

Parameters

field
Type: CLRObject Class
The field in the expression that represents a node in the hierarchy.
target
Type: RecId Extended Data Type
The RecID value of the FK field to which to compute the distance.
source
Type: RecId Extended Data Type
The RecID value of the FK field from which to calculate the distance.

Return Value

Type: int
The distance of the target node from the source node.

If a direct path from the source node to the target node does not exist then a non-zero value will be returned.

Community Additions

ADD
Show: