• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/document.php
  • Класс: CBPDocument
  • Вызов: CBPDocument::getDocumentFromHistory
static function getDocumentFromHistory($historyId, &$arErrors)
{
	$arErrors = array();

	try
	{
		$historyId = intval($historyId);
		if ($historyId <= 0)
			throw new CBPArgumentNullException("historyId");

		return CBPHistoryService::GetById($historyId);
	}
	catch (Exception $e)
	{
		$arErrors[] = array(
			"code" => $e->getCode(),
			"message" => $e->getMessage(),
			"file" => $e->getFile()." [".$e->getLine()."]"
		);
	}
	return null;
}