This method defines all the superiors of a user based on the organizational chart.
The first position above the user’s position in the organizational chart tree will be considered
the user’s superior. If the user does not have a position in the org chart, the method will return an empty list.
If the user is in the root of the org chart tree, the method will return this user.
Link to user object
Type parameters
I: Item<ItemData>
Hierarchy
Properties
Readonly code
App code of the URL’s target (the app’s code).
Readonly id
ID of the URL’s target.
Readonly namespace
Link target namespace (the code of the app's workspace).
Methods
block
The method locks a user’s account.
await Context.data.user.block();Returns Promise<void>
fetch
Request complete data of a reference object.
Returns Promise<UserItem>
getChiefs
The method retrieves all superiors of a user.
This method defines all the superiors of a user based on the organizational chart. The first position above the user’s position in the organizational chart tree will be considered the user’s superior. If the user does not have a position in the org chart, the method will return an empty list. If the user is in the root of the org chart tree, the method will return this user.
const chiefs = await Context.data.__createdBy.getChiefs(); Context.data.approver = chiefs[0];Returns Promise<UserItemRef[]>
unblock
The method unlocks a user’s account.
await Context.data.user.unblock();Returns Promise<void>
Feedback sent successfully
Thank you for your input