mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-02-09 13:47:03 +02:00
25 lines
866 B
Plaintext
25 lines
866 B
Plaintext
|
// The complete structure of the fields can be obtained by the GetTaskFieldsStructure() function()
|
||
|
|
||
|
CurrentDate = OPI_Tools.GetCurrentDate();
|
||
|
Hour = 3600;
|
||
|
Day = 24;
|
||
|
Responsible = 1;
|
||
|
|
||
|
TaskData = New Structure;
|
||
|
TaskData.Insert("TITLE" , "New task");
|
||
|
TaskData.Insert("DESCRIPTION" , "New task description");
|
||
|
TaskData.Insert("PRIORITY" , "2");
|
||
|
TaskData.Insert("DEADLINE" , CurrentDate + Hour * Day);
|
||
|
TaskData.Insert("RESPONSIBLE_ID", Responsible);
|
||
|
|
||
|
URL = FunctionParameters["Bitrix24_URL"];
|
||
|
|
||
|
Result = OPI_Bitrix24.CreateTask(URL, TaskData);
|
||
|
|
||
|
OPI_TestDataRetrieval.WriteLog(Result, "CreateTask (wh)", "Bitrix24");
|
||
|
|
||
|
URL = FunctionParameters["Bitrix24_Domain"];
|
||
|
Token = FunctionParameters["Bitrix24_Token"];
|
||
|
|
||
|
Result = OPI_Bitrix24.CreateTask(URL, TaskData, Token);
|