Skip to main content

Posts

Showing posts from March, 2020

How to add a custom activity type in Bitrix24 CRM

During one of our recent self-hosted Bitrix24 implementations, we had the task of adding a new type of Activity to CRM - something between a Call Activity and a Visit Activity. The customer wanted this new Activity to be able to participate in CRM reports and filters. To begin with, it was necessary to add a link to a new Activity type in the CRM entity card. We found out that the crm.timeline component is responsible for the output of this part of the interface. In particular, its template.php contains a list of displayed links to case types. For example, for a call, something like: Accordingly, as we can see, this is a regular link with the data parameter item-item-id. So we can add ours, with our own unique data-item-id. As you can see, the href for the link is set as "#" - clicking on this link is processed by the JS code from the script.js of this component. Indeed, the BX.CrmTimelineMenuBar function is responsible for this.processItemSelection().