Documentation

crm.timeline.comment.add

Scope: catalog Permissions to execute: for all

crm.timeline.comment.add(fields)

The method adds new comment to a timeline.

Parameters

Parameter Description
fields Set of fields - array ("field"=>"value"[, ...]), containing field values. Required fields - ENTITY_ID
Field DescriptionTypeNote
ENTITY_ID Item ID with associated timeline entry. integer Invariable\Required
and ENTITY_TYPE
Field DescriptionTypeNote
ENTITY_TYPE Item type with associated comment.
Values:
  • lead - lead;
  • deal - deal;
  • contact - contact;
  • company - company;
  • order - order.
string Invariable\Required
.

Attention! Starting from CRM module version 23.100.0 receives only the parameters with the 'fields' key defined in lower case. Other undocumented variants: Fields, FIELDS, arFields are not accepted.

Example

   BX24.callMethod(
       "crm.timeline.comment.add",
       {
           fields:
           {
               "ENTITY_ID": 10,
               "ENTITY_TYPE": "deal",
               "COMMENT": "New comment was added"
           }
       },
       function(result)
       {
           if(result.error())
               console.error(result.error());
           else
               console.info("New comment added. ID - " + result.data());
       }
   );


© «Bitrix24», 2001-2024