Documentation

crm.productsection.add

crm.productsection.add(fields)

Creates a new product section.

Parameters

Parameter Description
fields Set of fields - is an array ("field"=>"value"[, ...]), containing product section fields values.
Note: to find out the required field format, execute the method crm.productsection.fields to view the retrieved field format.

Example

	var catalogId = prompt("Enter the catalog ID");
		var sectionId = prompt("Enter the parent section ID (or 0 for the root))");
		var sectionName = prompt("Enter the section name");
		BX24.callMethod(
			"crm.productsection.add", 
			{
				fields:
				{ 
					CATALOG_ID: catalogId,
					NAME: sectionName,
					SECTION_ID: sectionId	
				}
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
					console.info("New section was created with ID" + result.data());
			}
		);	


© «Bitrix24», 2001-2024
Up