• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/task.php
  • Класс: Bitrix\Crm\Activity\Provider\Task
  • Вызов: Task::deleteAssociatedEntity
static function deleteAssociatedEntity($entityId, array $activity, array $options = array())
{
	if (isset($options['SKIP_TASKS']) && $options['SKIP_TASKS'] === true)
		return new Main\Result();

	$entityId = (int) $entityId;
	if ($entityId <= 0 || !Loader::includeModule('tasks'))
	{
		return false;
	}

	self::lockTask($entityId, self::LOCK_TYPE_DELETE);
	\CTasks::delete($entityId);
	self::unlockTask($entityId);

	return new Main\Result();
}