Documentation

crm.lead.add

crm.lead.add(fields)

Creates and adds a new lead.

Parameters

Parameter Description
fields Set of fields - is an array ("field"=>"value"[, ...]) containing values of the lead fields.
params Set of parameters. REGISTER_SONET_EVENT - register a lead adding events in the activity stream. Additionally, notification will be sent to the responsible for the contact.

Example

<script type="text/javascript">
	BX24.callMethod(
			"crm.lead.add", 
			{
				fields:
				{ 
					"TITLE": "FatJoint LLC", 
					"NAME": "Paul", 
					"SECOND_NAME": "A.", 
					"LAST_NAME": "Nibot", 
					"STATUS_ID": "NEW", 
					"OPENED": "Y", 
					"ASSIGNED_BY_ID": 1, 
					"CURRENCY_ID": "USD", 
					"OPPORTUNITY": 12500,
					"PHONE": [ { "VALUE": "555888", "VALUE_TYPE": "WORK" } ] 
				}
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
					console.info("Created a new lead, ID=" + result.data());
			}
		);			
</script>


User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2018, «Bitrix Inc.», 2018
Наверх