Documentation

crm.contact.details.configuration.set

The method sets configuration for contact details. Writes personal configuration for selected user details or deletŠµs general configuration for all users.

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.
data Configuration array.

Example

//Set personal configuration for contact details for the user with identifier 1.
BX24.callMethod(
    "crm.contact.details.configuration.set",
    {
        scope: "P",
        userId: 1,
        data:
            [
                {
                    name: "main",
                    title: "Contact details",
                    type: "section",
                    elements:
                        [
                            { name: "NAME" },
                            { name: "SECOND_NAME" },
                            { name: "LAST_NAME" },
                            { name: "PHOTO" },
                            { name: "BIRTHDATE" },
                            { name: "POST" },
                            { name: "PHONE" },
                            { name: "EMAIL" },
                            { name: "COMPANY" }
                        ]
                },
                {
                    name: "additional",
                    title: "Additional",
                    type: "section",
                    elements:
                        [
                            { name: "TYPE_ID" },
                            { name: "SOURCE_ID" },
                            { name: "SOURCE_DESCRIPTION" },
                            { name: "OPENED" },
                            { name: "EXPORT" },
                            { name: "ASSIGNED_BY_ID" },
                            { name: "COMMENTS" }
                        ]
                }
            ]
    },
    function(result)
    {
        if(result.error())
            console.error(result.error());
        else
            console.dir(result.data());
    }
);
//---


© «Bitrix24», 2001-2022
Up