Documentation

task.commentitem.add

Creates a new comment to a task. Returns the ID of the added comment.

Method Parameters

ParameterDescription
TASKID Task ID. Required parameter.
FIELDS Data field array for a task (POST_MESSAGE). Required parameter.

Attention! Compliance to parameter sequence in the request is mandatory. If sequence is not observed, the request will be completed with errors.

FieldsDescriptionVersion
AUTHOR_ID  Comment creator ID.
AUTHOR_NAME  User name (optional).
AUTHOR_EMAIL  User e-mail (optional).
USE_SMILES  (Y|N) - parse or do not parse comment for available smileys.
POST_MESSAGE  Message text.
UF_FORUM_MESSAGE_DOC Array with files from drive to be attached ['n123', ...]

Example

// Adding a new comment with the test "HELLO" for the task with ID=13

BX24.callMethod(
    'task.commentitem.add',
    [13, {'POST_MESSAGE': 'HELLO'}],
    function(result){
      console.info(result.data());
      console.log(result);
    }
);


© «Bitrix24», 2001-2024