• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entitybankdetail.php
  • Класс: Bitrix\Crm\EntityBankDetail
  • Вызов: EntityBankDetail::rebindBankDetail
static function rebindBankDetail($entityTypeId, $targEntityId, $seedBankDetailId)
{
	if (!self::checkEntityType($entityTypeId))
	{
		throw new Main\ArgumentException(GetMessage('CRM_BANKDETAIL_ERR_INVALID_ENTITY_TYPE'), 'entityTypeId');
	}

	$bankDetail = self::getSingleInstance();
	$res = $bankDetail->getList(
		array(
			'select' => array('ID'),
			'filter' => array('ID' => $seedBankDetailId))
	);
	while($fields = $res->Fetch())
	{
		$bankDetail->update($fields['ID'], array('ENTITY_TYPE_ID' => $entityTypeId, 'ENTITY_ID' => $targEntityId));
	}
}