Documentation

crm.dealcategory.add

Scope: catalog Permissions to execute: for all

crm.dealcategory.add(fields)

Creates a new deal category.

Parameters

Note: to find out the required field format, execute the method crm.dealcategory.fields to view the retrieved field format.
Parameter Description
fields Set of fields - is an array (“updated field"=>”value”[, ...]), where “updated field” can have values, returned by crm.dealcategory.fields method (except for the fields, marked by isReadOnly attribute).

Example

    "crm.dealcategory.add", 
    {
        fields:
        { 
            "NAME": "New directory", 
            "SORT": "20"
        }
    }, 
    function(result) 
    {
        if(result.error())
            console.error(result.error());
        else
            console.info("Category created, ID " + result.data());
    }
);


© «Bitrix24», 2001-2024
Up