Documentation

crm.entity.details

Starting from version 20.5.500, CRM module can manage tabs in the CRM item details.


The crm.entity.details component generates set of tabs in the CRM item details. After the component has generated set of tabs, throw a PHP-event to modify them.

Example

This Handler example adds an empty tab "custom" :

Bitrix\Main\EventManager::getInstance()->addEventHandler(
	'crm',
	'onEntityDetailsTabsInitialized', 
	static function(\Bitrix\Main\Event $event) {
		$tabs = $event->getParameter('tabs');
		$tabs[] = [
				'id' => 'custom',
				'name' => 'custom',
			];

		return new \Bitrix\Main\EventResult(\Bitrix\Main\EventResult::SUCCESS, [
			'tabs' => $tabs,
		]);
	}
);

The following parameters are received by handler:

  • entityID - entity identifier;
  • entityTypeID - entity type identifier;
  • guid - details card string identifier;
  • tabs - array with tab description.

Event must return set of tabs by the tabs key.

You can find an example in the following method: \CCrmEntityPopupComponent::updateTabsByEvent()

© «Bitrix24», 2001-2024
Up