PCModelingLibrary::maxNumberOfSubComponentChildren Method [AX 2012]

Counts the maximum number of children of any sub tree of the component class as specified by the _parentClass table record parameter, which includes itself.

server public static int maxNumberOfSubComponentChildren(
    PCClass _parentClass, 
    PCSubComponent _subComponent, 
   [int _parentLevel])

Run On

Server

Parameters

_parentClass
Type: PCClass Table
The PCClass table record for which the number of children will be counted.
_subComponent
Type: PCSubComponent Table
_parentLevel
Type: int
The position of the parent in the hierarchy; optional.

Return Value

Type: int
The maximum number of children of any sub tree of the record in the PCClass table that is specified by the _parentClass parameter.

The return value includes the parents of the record in the PCClass table that is specified by the _parentLevel parameter and itself.

Show: