crm.lead.contact.items.set
crm.lead.contact.items.set(id, items)
Defines set of contacts, linked with specified lead.
Parameters
Parameter | Description | Available from version |
---|---|---|
id | Lead ID. | |
items | Set of contacts as array with objects containing fields:
|
Example
var id = prompt("Enter lead ID"); BX24.callMethod( "crm.lead.contact.items.set", { id: id, items: [{ "CONTACT_ID": 1010, "SORT": 10, "IS_PRIMARY": "Y" }, { "CONTACT_ID": 1020, "SORT": 20, "IS_PRIMARY": "N" }] }, function(result) { if (result.error()) { console.info("Cannot add contacts to lead"); console.error(result.error()); } else { console.info("Contacts successfully added to lead"); console.dir(result.data()); } } );
© «Bitrix24», 2001-2024