Documentation

imopenlines.crm.chat.getLastId

The method gets ID of the last chat that is associated with CRM entity.

Parameters

Parameter Description Available from version
CRM_ENTITY_TYPE CRM entity type (LEAD/DEAL/COMPANY/CONTACT, required)
CRM_ENTITY CRM entity ID (required)

Example

//imopenlines.crm.chat.getLastId
function crmChatGetLastId() {
   var params = {
      CRM_ENTITY_TYPE: 'LEAD', //LEAD|DEAL|COMPANY|CONTACT
      CRM_ENTITY: 1,
   };
   BX24.callMethod(
      'imopenlines.crm.chat.getLastId',
      params,
      function (result) {
         if (result.error())
            alert("Error: " + result.error());
         else
            alert("Успешно: " + result.data());
      }
   );
}


© «Bitrix24», 2001-2024
Up