• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/orderhistory.php
  • Класс: BitrixSaleOrderHistory
  • Вызов: OrderHistory::addRecord
static function addRecord($entityName, $orderId, $type, $id = null, $entity = null, array $data = array())
{
	global $USER;
	$userId = (is_object($USER)) ? intval($USER->GetID()) : 0;

	$fields = array(
		"ORDER_ID" => intval($orderId),
		"TYPE" => $type,
		"DATA" => (is_array($data) ? serialize($data) : $data),
		"USER_ID" => $userId,
		"ENTITY" => $entityName,
		"ENTITY_ID" => $id,
	);

	static::addInternal($fields);
}