• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/rest/synchronization/loader/entity.php
  • Класс: BitrixSaleRestSynchronizationLoaderEntity
  • Вызов: Entity::getFieldsByExternalId
public function getFieldsByExternalId($xmlId)
{
	if($xmlId === "")
	{
		return null;
	}

	$entity = $this->getEntityTable();

	if($r = $entity::getList([
		'select' => $this->getFields(),
		'filter' => array_merge(
			[
				$this->getExternalNameField() => $xmlId
			],
			$this->getAdditionalFilterFileds()
		),
		'order' => ['ID' => 'ASC']
		])->fetch()
	)
	{
		return $r['ID'];
	}

	return null;
}