Hierarchy

Properties

Readonly __createdAt

__createdAt: TDatetime

Date and time of creation.

Readonly __createdBy

__createdBy: UserItemRef

Object’s author.

Optional Readonly __deletedAt

__deletedAt: TDatetime

Date and time of deletion.

Readonly __dirname

__dirname: string

Full name of the folder including the hierarchy of all offices and categories it is included in.

Readonly __id

__id: string

ID of the object.

__name

__name: TString

Name of the object.

Readonly __updatedAt

__updatedAt: TDatetime

Date and time of change.

Readonly __updatedBy

__updatedBy: UserItemRef

Author of the last change.

Readonly directoryID

directoryID: string

ID of the parent office/category.

Readonly settings

Folder settings.

Methods

getDirectory

  • The method returns the current category and/or office.

    Let's see how to use the method to get the directory of the folder, specified in the registration settings. To obtain it, the app item is required. In this script, it is stored in the context.

    const  settings = await Application.getSettings();
    const nomenclatures = await  settings.registrationSettings.getNomenclatures(); 
    const nom =  nomenclatures[0]; 
    const directory = await nom.getDirectory(); 
    

    Returns Promise<TNomenclatureDirectory>

    Folder directory.

getSerial

  • The method returns a counter.

    In this example, the method is used to retrieve the serial number of the first folder specified in the registration settings. To obtain it, an app item is required. In this script, the item is stored in the context.

    const settings = await Application.getSettings();
    const  nomenclatures = await settings.registrationSettings.getNomenclatures();  
    const nom = nomenclatures[0]; 
    const serial = await nom.getSerial(); 
    

    Returns Promise<SerialData>

    Folder counter.