Documentation

crm.quote.add

crm.quote.add(fields)

Creates a new quote.

Parameters

Parameter Description
fields Set of fields - is array ("field"=>"value"[, ...]), containing values of quote fields, where "field" can have values, returned by the crm.quote.fields method.

Example

BX24.callMethod(
	"crm.quote.add", 
	{
		fields:
		{ 
			"TITLE": "Draft", 
			"STATUS_ID": "DRAFT",
			"OPENED": "Y", 
			"ASSIGNED_BY_ID": 1, 
			"CURRENCY_ID": "USD", 
			"OPPORTUNITY": 5000,
			"COMPANY_ID": 1,
			"COMMENTS": "New quote.",
			"BEGINDATE": "2016-03-01T12:00:00",
			"CLOSEDATE": "2016-04-01T12:00:00"
		}
	}, 
	function(result) 
	{
		if(result.error())
			console.error(result.error());
		else
			console.info("Quote with ID is created" + result.data());
	}
);	


© «Bitrix Inc.», 2001-2019, «Bitrix Inc.», 2019