task.item.add
Attention! This method is deprecated and is no longer supported. It is recommended to use the methods tasks.task.*.
Creates a new task. Returns ID of added task. The following fields are available.
Function parameters
Parameter | Description |
---|---|
TASKDATA | Data fields array for a task (TITLE, DESCRIPTION, etc.). |
Attention! Compliance to parameter sequence in the query is mandatory. If sequence is not observed, the request will be executed with errors.
Example
// Create a task var dt = new Date(); BX24.callMethod( 'task.item.add', [{TITLE: 'created via REST API at ' + dt.toLocaleString(), RESPONSIBLE_ID: 1, DEADLINE: '2013-05-13T16:06:06+03:00'}], function(result){ { console.info(result.data()); console.log(result); } );
Example of writing values in CRM:
BX24.callMethod( 'task.item.update', [1, {UF_CRM_TASK: ["L_4", "C_7", "CO_5", "D_10"]}], function(result) { console.info(result.data()); console.log(result); } );
Digits signify the IDs of corresponding values. Value L_4
signifies a link of the Lead with ID = 4 to the task. Several links of single type can be specified, for example L_4, L_5
.
- L - Lead
- C - Contact
- CO - Company
- D - Deal
© «Bitrix24», 2001-2024