Documentation

crm.documentgenerator.template.getfields

crm.documentgenerator.template.getfields(id, entityTypeId, entityId, values = [])

The method returns list of template fields with their description.

Parameters

Parameter Description
idtemplate ID
entityTypeIdID of the CRM entity type
entityIdUsed entity ID
valuesarray of additional values

Example

"templateFields": {
    "DocumentNumber": {
        "title": "Number" // title
        "value": "22" // value
        "group": [ // hierarchy
            0: "Document"
        ],    
        "default": "22" // default value
    },
    "MyCompanyUfLogo": { // image type field
        "title": "Logo",
        "value": "", 
        "type": "IMAGE",
        "group": [
            0: "Document",
            1: "My company"
        ],
        "default": ""
    },
    "MY_COMPANY": { // field that have several selection options
        "title": "My company"
        "value": [
            0: {
                "value": "6"
                "title": "Bitrix24"
                "selected": "1"
            },
            1: {
                "value": "11"
                "title": "Ice Cream, LLC"
                "selected":" "
            }
        "group": [
            0: "Document",
            1: "My Company"
        ],
    }
}


© «Bitrix24», 2001-2024