Documentation

crm.lead.update

Scope: catalogPermissions to execute: for all

crm.lead.update(id, fields, params)

Updates the specified (existing) lead.

Important! It is strongly recommended to pass the full set of fields to the update method when updating the address. Specifics of address fields are described here.

Parameters

Parameter Description
id Lead ID.
fields An array in format array("field"=>"value"[, ...]) containing values of the contact fields that need to be updated. The fields can be one or more of those returned by crm.lead.fields.
Note: to find out the required field format, execute the method crm.lead.fields to view the retrieved field format.
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());						
		}
	}
);

Additional



© «Bitrix24», 2001-2024