Codeunit "BOM Tree"

ID 3682
Namespace: Microsoft.Inventory.BOM.Tree

Helps create and traverse data as nodes in a tree. The structure supports disjoint trees as well as multiple parents for a child node.

Properties

Name Value
Access Public

Methods

AddRelation

Adds a relation between two nodes connected in a parent- child relationship.

procedure AddRelation(Parent: Codeunit "BOM Node", Child: Codeunit "BOM Node")

Parameters

Name Type Description
Parent Codeunit Microsoft.Inventory.BOM.Tree."BOM Node"

The node that represents the parent part of the relationship.

Child Codeunit Microsoft.Inventory.BOM.Tree."BOM Node"

The node that represents the child part of the relationship.

TraverseDown

Traverses the nodes starting from the root node and traverses down to the children and so on. Note that there can be many root nodes, in which case, the traversal starts from each of them.

procedure TraverseDown()

TraverseDown

Traverses the nodes starting from the given node and traverses down to the children and so on.

procedure TraverseDown(Node: Codeunit "BOM Node")

Parameters

Name Type Description
Node Codeunit Microsoft.Inventory.BOM.Tree."BOM Node"

The node from which the traversal should start.

ChildHasKey

Finds if a node with the given key is a child of another node with the given parent key.

<param name="ParentKey">The key of the parent node.</param> <param name="ChildKey">The key of the child node.</param> <returns>True if there was a child found with the key, false otherwise.</returns> <remarks>This will return false if the node with the parent key was not found.</remarks>
procedure ChildHasKey(ParentKey: Text, ChildKey: Text): Boolean

Parameters

Name Type Description
ParentKey Text
ChildKey Text

Returns

Type Description
Boolean

See also