Skip to content

OptionsManager Class

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.

Methods

appGet

ts
appGet(option: string): any

Retrieves the value of an application option.

Returns the option value or throws an error if the option is not set.

Similar to function

ts
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const value: any = $b24.options.appGet('test')

appSet

ts
async appSet(
	option: string,
	value: any
): Promise<void>

Sets the value of an application option.

Similar to function

ts
// ... /////
$b24 = await initializeB24Frame()
// ... /////
await $b24.options.appSet('test', 123)

userGet

ts
userGet(
	option: string
): any

Retrieves the value of a user option.

Returns the option value or throws an error if the option is not set.

Similar to function

ts
// ... /////
$b24 = await initializeB24Frame()
// ... /////
const value: any = $b24.options.userGet('test')

userSet

ts
async userSet(
	option: string,
	value: any
): Promise<void>

Sets the value of a user option.

Similar to function

ts
// ... /////
$b24 = await initializeB24Frame()
// ... /////
await $b24.options.userSet('test', 123)

Released under the MIT License.