lists.section.add
Scope: catalog Permissions to execute: for all
lists.section.add( params )
The method creates a list section. Returns true on success, otherwise throws Exception.
Parameters
Parameter | Description | Available from version |
---|---|---|
IBLOCK_TYPE_ID | Information block type ID (required). Possible values:
| |
IBLOCK_CODE/IBLOCK_ID | Information block Code or ID (required). | |
SOCNET_GROUP_ID | Group ID (required when creating list for group); | |
IBLOCK_SECTION_ID | Parent section ID. In not specified, root section is indicated. | |
FIELDS | Array of fields and values: Available fields are described in the Structure for Iblock Module Tables. Required fields: NAME. | |
SECTION_CODE | Section character code (required). |
Example
/* lists.section.add */ var params = { 'IBLOCK_TYPE_ID': 'lists', 'IBLOCK_CODE': 'rest_1', 'FIELDS': { 'NAME': 'Section_1', 'SECTION_CODE': 'Section_code_1' } }; BX.rest.callMethod( 'lists.section.add', params, function(result) { if(result.error()) alert("Error: " + result.error()); else console.log(result.data()); } );
© «Bitrix24», 2001-2024