Documentation

lists.field.type.get

lists.field.type.get (params, fields)

This method returns accessible field types for the specified list. If successful, the list of accessible field type will be returned, otherwise, returns an empty array.

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 workgroup lists
IBLOCK_CODE/IBLOCK_IDcode or ID for information block (required);
FIELD_IDField ID. (If information block property field, then the format is: PROPERTY_propertyId. If not specified, it returns accessible type, with the type of specified field)

Example

    var params = {
        'IBLOCK_TYPE_ID': 'lists_socnet',
        'IBLOCK_CODE': 'rest_1'
    };
    if(!params.IBLOCK_CODE && !params.IBLOCK_ID)
        return;
    BX24.callMethod(
        'lists.field.type.get',
        params,
        function(result)
        {
            if(result.error())
            {
                alert("getFieldTypes: " + result.error());
            }
            else
            {
                var types = result.data(), html = '';
                for(var typeId in types)
                {
                    if(!types.hasOwnProperty(typeId)) continue;
                    html += '';
                }
                $('#field-type').html(html);
            }
        }
    );


© «Bitrix24», 2001-2024
Up