Documentation

crm.lead.details.configuration.set

The method sets configuration for lead details. Writes personal configuration for selected user or general configuration for all users.

Note that configuration for repeat lead details can differ from the common lead details. Use the parameter leadCustomerType to switch between lead detail configuration.

Parameters

Parameter Description Available from version
scope Configuration scope of application. Available values:
  • P - personal configuration,
  • C - general configuration
userId User ID. Indicates current ID if not set. Only required when setting personal configuration.
extras Extra parameters. leadCustomerType parameter for deals can be specified here with values as follows:
  • 1 - common leads,
  • 2 - repeat leads

Example

//---
//Set personal configuration for lead details for user with identifier 1.
BX24.callMethod(
    "crm.lead.details.configuration.set",
    {
        scope: "P",
        userId: 1,
        data:
            [
                {
                    name: "main",
                    title: "General information",
                    type: "section",
                    elements:
                        [
                            { name: "TITLE" },
                            { name: "STATUS_ID" },
                            { name: "NAME" },
                            { name: "BIRTHDATE" },
                            { name: "POST" },
                            { name: "PHONE" },
                            { name: "EMAIL" }
                        ]
                },
                {
                    name: "additional",
                    title: "Additional",
                    type: "section",
                    elements:
                        [
                            { name: "SOURCE_ID" },
                            { name: "SOURCE_DESCRIPTION" },
                            { name: "OPENED" },
                            { name: "ASSIGNED_BY_ID" },
                            { name: "OBSERVER" },
                            { name: "COMMENTS" }
                        ]
                }
            ]
    },
    function(result)
    {
        if(result.error())
            console.error(result.error());
        else
            console.dir(result.data());
    }
);
//---


© «Bitrix24», 2001-2024