Documentation

lists.update

Scope: catalog Permissions to execute: for all

Description

lists.update (params, fields)

This method updates an existing list. Returns true on success, otherwise throws an exception.

Parameters

ParameterDescription
IBLOCK_TYPE_ID Information block type ID (required):
  • lists - information block type for lists
  • bitrix_processes - information block type for processes
  • lists_socnet - information block type for group lists
IBLOCK_CODE/IBLOCK_IDcode or ID for information block (required);
SOCNET_GROUP_IDworkgroup ID (required when creating list for a workgroup)
FIELDSinformation block fields:
  • NAME - name of information block (required);
  • DESCRIPTION - description;
  • SORT - sorting;
  • PICTURE - image;
  • BIZPROC - enabling workflow support.
MESSAGESdescriptors to elements and sections of the list;
RIGHTSaccess permission.

Example

    var params = {
        'IBLOCK_TYPE_ID': 'lists_socnet',
        'IBLOCK_CODE': 'rest_1',
        'FIELDS': {
            'NAME': 'List 1 (Update)',
            'DESCRIPTION': 'Test list (Update)',
            'SORT': '20',
            'PICTURE': document.getElementById('iblock-image-update')
        },
        'RIGHTS': {
            'G1': 'X'
        }
    };
    BX24.callMethod(
        'lists.update',
        params,
        function(result)
        {
            if(result.error())
                alert("Error: " + result.error());
            else
                alert("Success: " + result.data());
        }
    );


© «Bitrix24», 2001-2024
Up