Answer the question
In order to leave comments, you need to log in
How to add an entry to the infoblock via the API?
Suppose I parse the page with a script, I have output data: preview image, news title, text, auto, tags, etc. Now how to create a record in the news infoblock, of course, so that all the corresponding fields are filled in
Answer the question
In order to leave comments, you need to log in
https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
<?
$el = new CIBlockElement;
$arLoadProductArray = Array(
"IBLOCK_ID" => ,
"NAME" => ,
"PREVIEW_TEXT" => ,
"DETAIL_TEXT" => ,
"DETAIL_PICTURE" => ,
);
if($PRODUCT_ID = $el->Add($arLoadProductArray))
echo "New ID: ".$PRODUCT_ID;
else
echo "Error: ".$el->LAST_ERROR;
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question