PCModelingLibrary::numberOfSubComponentParents Method [AX 2012]

Counts the number of parents of the component class as specified by the _childClass table record parameter, which includes itself.

server public static int numberOfSubComponentParents(
    PCClass _childClass, 
    PCSubComponent _subComponent, 
   [int _childLevel])

Run On

Server

Parameters

_childClass
Type: PCClass Table
The record of the PCClass table for which the number of parents will be counted.
_subComponent
Type: PCSubComponent Table
_childLevel
Type: int
The position of the child in the hierarchy; optional.

Return Value

Type: int
The number of parents of the record in the PCClass table as specified by the _parentClass parameter; also counting the _childLevel parameter and itself.
Show: