• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/exchange/integration/service/batchable/base.php
  • Класс: BitrixSaleExchangeIntegrationServiceBatchableBase
  • Вызов: Base::relationRefreshByDstEntity
public function relationRefreshByDstEntity($list)
{
	foreach($list as $index=>$dstEntityId)
	{
		$item = $this->getCollection()->getItemByIndex($index);
		if(is_null($item) == false)
		{
			$relation = new BitrixSaleExchangeIntegrationRelationRelation(
				$this->getSrcEntityTypeId(),
				$index,
				$this->getDstEntityTypeId(),
				$dstEntityId);

			$relation->save();
			//collection->getItemByIndex(index)->getEntity->getRelation->setDstEntityId($data['ID'])
		}
	}
	$this->relationLoad();
}