ChartOfAccountsRef.<Chart of accounts name>.BelongsToItem

Syntax:

BelongsToItem(<Item>)

Parameters:

<Item> (required)

Type: ChartOfAccountsRef.
The account for which is determined the belonging.

Returned value:

Type: Boolean.
True indicates the account is subordinated to another account; otherwise it is False.
If the item itself is used as parameter, then False.

Description:

Defines whether the account is subordinated to another account (item) in accordance with all hierarchical levels.

Availability:

Server, thick client, external connection.

Note:

Determines an subordination at the point at which the method was invoked, by consecutively reading all higher level items.

Example:

LF = ChartsOfAccounts["Main"];
Account01   = LF.MainFacility;
Account01_1 = LF.BasicMeansOfOrganization;
Account02   = LF.BasicMeansAmortization;
Account03   = LF.ProfitableInvestments;
// ...
SelectionByExtDimension = QueryResult.Choose(QueryResultIteration.ByGroups, "ExtDimension1");
While 
SelectionByExtDimension.Next() Do
    SelectionByAccounts = SelectionByExtDimension.Choose(QueryResultIteration.ByGroups, "Account");
    While 
SelectionByAccounts.Next() Do
        If SelectionByAccounts.Account = Account01_1 Then
            // ...
        ElseIf SelectionByAccounts.Account.BelongsToItem(Account03) Then
            // ...
        EndIf;
        // ...
    EndDo;
EndDo
;


    

1C:Enterprise Developer's Community