use Bitrix\Main\Loader; use Bitrix\Main\SiteTable; use Bitrix\Main\Config\Option; use Bitrix\Currency\CurrencyTable; require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_admin_before.php'); require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/catalog/prolog.php'); Loader::includeModule('catalog'); $var = CCatalogDocs::add( "DOC_TYPE" => "A", "SITE_ID" => "s1", "DATE_DOCUMENT" => "11.07.2016 17:16:55", "CREATED_BY" => "1", "MODIFIED_BY" => "1", "COMMENTARY" => "", "CONTRACTOR_ID" => "1", "CURRENCY" => "EUR", "TOTAL" => "22" ); echo $var;?>
CCatalogDocs::add
use this bitrix method. There is nothing in the documentation about it. Connecting models is OK, when the method runs, the site crashes and does not show any errors.