Documentation

crm.lead.contact.delete

crm.lead.contact.delete(id, fields)

Deletes contact from specified lead.

Parameters

Parameter Description Available from version
id Lead ID.
fields Object with fields:
  • CONTACT_ID - contact identifier (required field)

Example

var id = prompt("Enter lead ID");

BX24.callMethod(
    "crm.lead.contact.delete",
    {
        id: id,
        fields:
        { 
            "CONTACT_ID": 1010
        },
    },
    function(result)
    {
        if (result.error())
        {
            console.info("Cannot unlink contact from lead");
            console.error(result.error());
        }
        else
        {
            console.info("Contact successfully unlinked from lead");
            console.dir(result.data());
        }
    }
);


© «Bitrix24», 2001-2024