Hierarchy
-
BaseItemData
- TNomenclature
Properties
Readonly __createdAt
Date and time of creation.
Readonly __createdBy
Object’s author.
Optional Readonly __deletedAt
Date and time of deletion.
Readonly __dirname
Full name of the folder including the hierarchy of all offices and categories it is included in.
Readonly __id
ID of the object.
__name
Name of the object.
Readonly __updatedAt
Date and time of change.
Readonly __updatedBy
Author of the last change.
Readonly directoryID
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 this method to get the directory of the first folder specified in an app’s registration settings. To do that, an app item is needed. 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.
The example shows how to get the counter of the first folder specified in the registration settings. To get the folder, the app item is needed. 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 serial = await nom.getSerial();
Returns Promise<SerialData>
Folder counter.
Folder