Click Reaction
ActionDto — the action defines the reaction to a click on a specific timeline record element. There are several different types of actions, each with its own format.
Link Navigation
If a relative link to standard Bitrix24 objects that support opening in a slider is used, the slider will be displayed. Otherwise, it will be a regular link navigation.
Parameters
Required parameters are marked with *
|
Field |
Description |
|
type* |
Value |
|
uri |
Valid URI link, for example |
Example
{
"type": "redirect",
"uri": "/crm/deal/details/1/"
}
Event
Calling the action will generate the event onCrmTimelineItemAction. When the event occurs, handlers will be triggered only for the application that created this timeline record. The context will always be passed to the handler:
- id - event identifier,
- entityTypeId - identifier of the object type to which the deal is linked,
- entityId - identifier of the element of this object,
- activityId - identifier of the deal,
- userId - identifier of the user who triggered the action.
Parameters
Required parameters are marked with *
|
Field |
Description |
|
type* |
Value |
|
id* |
Event identifier. Any value can be specified, for example |
|
actionParams |
Array of arbitrary format, the data from which will be passed to the event handler |
|
animationType |
Animation that will be shown during event processing, for example |
In some cases, sending the event implies that the handler of this event should change the appearance of the record in the timeline. For example, adding new blocks or changing the set of buttons.
To ensure the user sees the update, the animationType parameter can be used. If animationType is set to loader — the timeline record will be blocked and a loader will appear on top of it. The blocking will last until the record is updated via crm.activity.configurable.update.
If the action is triggered by clicking a button at the bottom of the timeline and animationType is set to disable — this button will be blocked until the record is updated via crm.activity.configurable.update.
Example
{
"type": "restEvent",
"id": "resetButtonClick",
"actionParams": {
"myId": 123,
"someImportant": "qwerty"
},
"animationType": "disable"
}
The action is assigned to a button. Clicking it will trigger the event handler onCrmTimelineItemAction, registered by the application that created the timeline record.
The standard parameters id=resetButtonClick, entityTypeId, entityId, activityId, userId and the parameters defined by the developer — myId=123 and someImportant=qwerty will be passed to the handler. The button will be blocked from the moment it is clicked until the timeline record is updated via crm.activity.configurable.update.
Opening the Application Slider
Warning
The action is not supported in the mobile application.
Calling the action will open the slider of the application that created the timeline record. The context will be passed to the slider:
- entityTypeId - identifier of the object type to which the deal is linked,
- entityId - identifier of the element of this object,
- activityId - identifier of the deal.
Parameters
Required parameters are marked with *
|
Field |
Description |
|
type* |
Value |
|
actionParams |
Array of arbitrary format, the data from which will be passed to the event handler |
|
sliderParams |
Options with which the slider is opened |
Example
{
"type": "openRestApp",
"actionParams": {
"myId": 123,
"someImportant": "qwerty"
},
"sliderParams": {
"title": "This is the application slider title",
"width": 700
}
}
ActionSliderParamsDto
Parameters for Opening the Application Slider
|
Field |
Description |
Additional |
|
width |
Width of the slider, |
Cannot be used simultaneously with |
|
leftBoundary |
Slider spans the full width of the browser window with a left margin, |
Cannot be used simultaneously with |
|
title |
Text of the browser window title when opening the slider |
Continue Exploring
- Structure of Configurable Activity
- Icon
- Record Header
- Main Content Area of Configurable Activity
- Content Block of Configurable Deal
- Bottom Part of the Record
- Bottom Dropdown Menu
- Field Types
- Set of Additional Content Blocks
- Examples of Activity Configurations