Get User Settings BX24.userOption.get
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
BX24.userOption.get(string name): any | undefined;
The BX24.userOption.get method returns the value of the setting named name for the current user.
The method works after BX24.init and reads the user configurations loaded during library initialization.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
name* |
Parameter code |
Code Example
BX24.init(() => {
BX24.userOption.set('param_str', 'str');
BX24.userOption.set('param_numb', 1);
BX24.userOption.set('param_obj', {foo: 'bar'});
console.log(BX24.userOption.get('param_str')); // returns str
console.log(BX24.userOption.get('param_numb')); // returns 1
console.log(BX24.userOption.get('param_obj')); // returns {foo: 'bar'}
console.log(BX24.userOption.get('unknown')); // returns undefined
});
How to Use Examples in Documentation
Response Handling
The method synchronously returns the user configuration value.
Returned Data
|
Name |
Description |
|
result |
If a configuration named |
For example, an unretained code returns:
undefined
Error Handling
The method does not return error codes. A missing configuration is not considered an error: the method returns undefined.