crm.lead.contact.add
crm.lead.contact.add(id, fields)
Adds contact to a specified lead.
Parameters
Parameter | Description | Available from version |
---|---|---|
id | Lead ID. | |
fields | Object with fields:
|
Example
var id = prompt("Enter lead ID"); BX24.callMethod( "crm.lead.contact.add", { id: id, fields: { "CONTACT_ID": 1010, "SORT": 10, "IS_PRIMARY": "Y" } }, function(result) { if (result.error()) { console.info("Cannot add contact to lead"); console.error(result.error()); } else { console.info("Contact successfully added to lead"); console.dir(result.data()); } } );
© «Bitrix24», 2001-2024