UpdateDocument
void
IBPWorkflowDocument::UpdateDocument(
mixed documentId,
array arFields
);
This method modifies properties (fields) of specified document to the indicated values.
Method parameters
Parameter | Description |
---|---|
documentId | Document ID code |
arFields | Array of new document property values as follows
array(Property codes correspond to property codes that are returned by the GetDocumentFields method. |
Examples
<?
public function UpdateDocument($documentId, $arFields)
{
$documentId = intval($documentId);
if ($documentId <= 0)
throw new CBPArgumentNullException("documentId");
$iblockElement = new CIBlockElement();
$res = $iblockElement->Update($documentId, $arFields);
if (!$res)
throw new Exception($iblockElement->LAST_ERROR);
}
?>
© «Bitrix24», 2001-2024