Dialog Manager Class
Methods
selectUser
async selectUser(): Promise<null|SelectedUser>
Displays a standard dialog for selecting a single user.
Shows only company employees.
Returns a Promise that resolves to null or a SelectedUser object.
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const makeSelectUsers = async() => {
const selectedUser = await $b24.dialog.selectUser()
$logger.info(selectedUser)
}
selectUsers
async selectUsers(): Promise<SelectedUser[]>
Displays a standard dialog for selecting multiple users.
Shows only company employees.
Returns a Promise that resolves to an array of SelectedUser objects.
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const makeSelectUsers = async() => {
const selectedUsers = await $b24.dialog.selectUsers()
const list = selectedUsers.map((row: SelectedUser): string => {
return [ `[id: ${row.id}]`, row.name ].join(' ')
})
$logger.info(selectedUsers, list)
}
Data Types
SelectedUser
Used to represent information about a selected user in the Bitrix24 application. It contains several fields that describe the user's ID, name, photo, position, and other characteristics.
The
subandsupfields help determine hierarchical relationships between the current user and the selected user.
id: NumberString: User identifier. Represented as a string containing a numeric value.name: string: Formatted name of the user.photo: string: URL of the user's photo.position: string: User's position in the company.url: string: URL of the user's profile.sub: boolean: Flag indicating that the selected user is a subordinate of the current user. A value oftruemeans the user is a subordinate.sup: boolean: Flag indicating that the selected user is a supervisor of the current user. A value oftruemeans the user is a supervisor.
Auth
Designed for managing authentication in Bitrix24 applications. It handles authentication data received from the parent window and provides methods for updating and retrieving this data.
Options
Used for managing application and user settings in the Bitrix24 application. It allows initializing data, getting, and setting options through messages to the parent window.