Handle the first launch event of the application by the user BX24.install
BX24.install(someCallback: function|string): void;
The BX24.install function allows you to set a handler for the event "the application is launched for the first time by the current user." This event occurs immediately after the "library is ready for use" event, but before the handlers set in BX24.init are executed. The handler must signal the completion of the setup process by calling the BX24.installFinish function.
If a string is passed as the handler, it is treated as a link to a js file that needs to be loaded and executed when the event is triggered. In any case, if the current user is launching the application for the first time and at least one handler for this event is set, BX24.init will only be triggered after the call to BX24.installFinish.
Function Parameters
|
Name |
Description |
|
someCallback |
Accepts a function that will be executed upon success |
|
someCallback |
If a string is provided, it is the path to the js file. The file will be loaded first, then the BX24.installFinish function will be called |
Example
BX24.install(function(){
BX24.callMethod('user.current', {}, function(res){
alert('The Hello World application greets you, ' + res.data().NAME + '!');
BX24.installFinish();
});
});
How to Use Examples in Documentation
Continue Learning
- Initialize the BX24.init Library
- Notify about the completion of the installer BX24.installFinish
- Get Data for OAuth 2.0 BX24.getAuth
- Force Update Authorization Key BX24.refreshAuth