1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/md/Bitrix24/Calendars-management/Set-custom-calendar-settings.mdx
Vitaly the Alpaca (bot) a905471e08 Main build (Jenkins)
2025-10-10 09:59:43 +03:00

93 lines
3.0 KiB
Plaintext
Vendored

---
sidebar_position: 7
description: Set custom calendar settings and other functions to work with Bitrix24 in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Bitrix24]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Set custom calendar settings
Sets new custom calendar settings
`Function SetCustomCalendarSettings(Val URL, Val SettingsStructure, Val Token = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | URL of webhook or a Bitrix24 domain, when token used |
| SettingsStructure | --settings | Structure Of KeyAndValue | ✔ | Settings structure (see GetCalednarCustomSettingsStructure) |
| Token | --token | String | ✖ | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
Method at API documentation: [calendar.user.settings.set](https://apidocs.bitrix24.ru/api-reference/calendar/calendar-user-settings-set.html)
:::
<br/>
```bsl title="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 = "c866e568006e9f06006b12e400000001000...";
Result = OPI_Bitrix24.SetCustomCalendarSettings(URL, CalendarsStructure, Token);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
# 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 "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
:: 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 "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": true,
"time": {
"start": 1760044510,
"finish": 1760044510.83702,
"duration": 0.837022066116333,
"processing": 0,
"date_start": "2025-10-09T21:15:10+00:00",
"date_finish": "2025-10-09T21:15:10+00:00",
"operating_reset_at": 1760045110,
"operating": 0
}
}
```