Documentation

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

ParameterType Description
idinteger Item ID.
fieldsarray 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