- Home [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
- Getting started
- Use cases
-
API
- Object types
- Data types
-
Global constants
- Application
- ApplicationUserProfile
- ApplicationWithBatcher
- ApplicationWithParams
- BrandingSettings
- CompanyInfo
- Converter
- Directories
- Files
- HttpApiHandler
- HttpApiRequest
- ICache
- IStorage
- MailMessage
- Mailbox
- OrganisationStructure
- OrganisationStructureTree
- Portal
- PortalPageInfo
- PortalSettings
- Portals
- Process
- Processes
- ProductionSchedule
- Reminders
- Replacements
- Serial
- ServerCollection
- Service
- SignupUrlParams
- SystemCollections
- SystemCollectionsWithEvents
- SystemCollectionsWithFilterEvents
- Templater
- Translator
- UserGroups
- Users
- Watermarks
- Report
- Reports
- SR
- Work with apps
- Web requests
- Access permissions
- Document flow
- Live Chats
- “Code” widget
- Signatures
- Business calendars
- Integration with IP telephony
- Integration with email marketing services
Organizational chart tree object
The organizational chart as a tree structure. It is used to get the root of the organizational chart, to search an item by name, and to validate the org chart tree. The type has no constructor. A new item can be created using the OrganisationStructure.createTree method:
const tree = System.organisationStructure.createTree('CEO');
The current org chart tree can be loaded using the OrganisationStructure.fetchTree method:
const tree = await System.organisationStructure. fetchTree(); const newItem = System.organisationStructure.createItem( 'Marketing Director', OrganisationStructureItemType.Position); tree. getRoot().addChild(newItem); const errs = await tree.validate(); if ( errs.length === 0) { // Validated successfully }
Hierarchy
Methods
find
The method searches for an org chart item by name.
The method will return the first suitable item or "undefined" if no items are found.
Parameters
name: string
Returns OrganisationStructureItem | undefined
getRoot
The method allows you to create a new item of the organizational chart.
const tree = await System.organisationStructure.fetchTree(); const root = tree.getRoot();
Returns OrganisationStructureItem
validate
The method validates the org chart.
const errs = await tree.validate(); if (errs.length === 0) { // Validation successful }
If validation fails, the method returns an array with errors. If validation is successful, it returns an empty array.
Returns Promise<ErrorObject[]>
Methods