Documentation

catalog.document.update

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',
            'commentary': 'first document.',
        }
    }, 
    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 item', //title (field is available from catalog version 22.200.0)

        ],
    ]
);

echo '<pre>';
print_r($result);
echo '</pre>';

© «Bitrix24», 2001-2023
Up