catalog.document.update
Scope: catalog Permissions to execute: for all
catalog.document.update(id, fields)
Method updates an inventory management item.
Returns true
on success.
Parameters
Parameter | Type | Description |
---|---|---|
id | integer | Item ID. |
fields | array | Item parameters. |
Example
BX24.callMethod( 'catalog.document.update', { 'id': 42, 'fields': { 'total': '1000', // total amount of all PURCHASING_PRICE multiplied by AMOUNT 'commentary': 'first document.', 'title': 'New', //title (field available from version catalog 22.200.0) } }, function(result) { if(result.error()) console.error(result.error()); else console.log(result.data()); } );
$result = CRest::call( 'catalog.document.update', [ 'id' => 42, 'fields' => [ 'total' => '1000', 'commentary' => 'first document.', 'title' => 'New document', ], ] ); echo '<pre>'; print_r($result); echo '</pre>';
© «Bitrix24», 2001-2024