Skip to main content

Set custom calendar settings

Sets new custom calendar settings

Function SetCustomCalendarSettings(Val URL, Val SettingsStructure, Val Token = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringURL of webhook or a Bitrix24 domain, when token used
SettingsStructure--settingsStructure Of KeyAndValueSettings structure (see GetCalednarCustomSettingsStructure)
Token--tokenStringAccess token, when app auth method used

Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API


tip

Method at API documentation: calendar.user.settings.set


1C:Enterprise/OneScript code example
    CalendarsStructure = New Structure;
CalendarsStructure.Insert("view" , "month");
CalendarsStructure.Insert("showDeclined" , "Y");
CalendarsStructure.Insert("collapseOffHours" , "N");
CalendarsStructure.Insert("showCompletedTasks", "N");

URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";

Result = OPI_Bitrix24.SetCustomCalendarSettings(URL, CalendarsStructure);

URL = "b24-ar17wx.bitrix24.by";
Token = "8536b467006e9f06006b12e400000001000...";

Result = OPI_Bitrix24.SetCustomCalendarSettings(URL, CalendarsStructure, Token);
    # JSON data can also be passed as a path to a .json file

oint bitrix24 SetCustomCalendarSettings \
--url "b24-ar17wx.bitrix24.by" \
--settings "{'view':'month','showDeclined':'Y','collapseOffHours':'N','showCompletedTasks':'N'}" \
--token "***"
Result
{
"result": true,
"time": {
"start": 1739051130.31236,
"finish": 1739051130.34551,
"duration": 0.0331490039825439,
"processing": 0.00617885589599609,
"date_start": "2025-02-09T00:45:30+03:00",
"date_finish": "2025-02-09T00:45:30+03:00",
"operating_reset_at": 1739051730,
"operating": 0
}
}