BaseCalculationTypes.<Chart of calculation types name>.Add

Syntax:

Add()

Returned value:

Type: BaseCalculationTypesRow.

Description:

Adds a row to the end of the tabular section.

Availability:

Server, thick client, external connection.

Note:

The method can be used only when the tabular section is obtained from an object's property. If the tabular section is obtained from a reference property (or selection property), using this method would cause a runtime error.

Example:

Function CreateCalculationType(CCT, Code, Name, 
        BaseCalculationTypes = Undefined)
// CCT - chart of calculation types
    CT = CCT.FindByCode(Code);
    If 
CT.IsEmpty() Then
        CT = CCT.CreateCalculationType();
    Else
        CT = CT.GetObject();
        CT.BaseCalculationTypes.Clear();
    EndIf
;
    CT.Code = Code;
    CT.Name = Name;
    If 
BaseCalculationTypes<>Undefined Then
        For each Item In BaseCalculationTypes Do
            NewRow = CT.BaseCalculationTypes.Add();
            NewRow.CalculationType = Item.Value;
        EndDo
;
    EndIf
;
    CT.Write();
    Return 
CT.Ref;
EndFunction


    

1C:Enterprise Developer's Community