Documentation

crm.lead.update

crm.lead.update(id, fields)

Updates the specified (existing) lead.

Parameters

Parameter Description
id Specifies the lead ID.
fields An array in format array("field"=>"value"[, ...]) containing values for the fields that need to be updated. The fields can be one or more of those returned by crm.lead.fields.
params Set of parameters. REGISTER_SONET_EVENT - performs registration of a change event in a lead in the Activity Stream. Additionally, notification will be sent to the responsible for the company.

Example

	var id = prompt("Enter ID");
BX24.callMethod(
	"crm.lead.update", 
	{ 
		id: id,
		fields:
		{ 
			"STATUS_ID": "IN_PROCESS",  
			"CURRENCY_ID": "USD", 
			"OPPORTUNITY": 15500	
		},
		params: { "REGISTER_SONET_EVENT": "Y" }		
	}, 
	function(result) 
	{
		if(result.error())
			console.error(result.error());
		else
		{
			console.info(result.data());						
		}
	}
);


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-2017, «Bitrix Inc.», 2017