• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/integration/service/batchable/base.php
  • Класс: BitrixSaleExchangeIntegrationServiceBatchableBase
  • Вызов: Base::relationDeleteByDstEntity
public function relationDeleteByDstEntity($dstEntityList)
{
	/** @var IntegrationServiceInternalContainerItem $item */
	foreach($this->getCollection() as $item)
	{
		if($item->getEntity()->hasRelation())
		{
			if(!in_array($item->getEntity()->getRelation()->getDestinationEntityId(), $dstEntityList))
			{
				$item->getEntity()->getRelation()->setDestinationEntityId(0);
				$item->getEntity()->getRelation()->save();
			}
		}
	}
}