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());
	}
);	


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