Documentation

crm.company.add

crm.company.add(fields)

Creates and adds a new company.

Parameters

Parameter Description
fields An array in format array("field"=>"value"[, ...]) containing values of the company fields.
params Set of parameters. REGISTER_SONET_EVENT - registers company adding event in the activity stream. Additionally, notification will be sent to the responsible for the company.

Example

	BX24.callMethod(
			"crm.company.add", 
			{
				fields:
				{ 
					"TITLE": "Best Coffees LLC",
					"COMPANY_TYPE": "CUSTOMER",
					"INDUSTRY": "MANUFACTURING",
					"EMPLOYEES": "EMPLOYEES_2",
					"CURRENCY_ID": "GBP",
					"REVENUE" : 3000000,
					"LOGO": { "fileData": document.getElementById('logo') },
					"OPENED": "Y", 
					"ASSIGNED_BY_ID": 1, 
					"PHONE": [ { "VALUE": "555888", "VALUE_TYPE": "WORK" } ] 	
				}
			}, 
			function(result) 
			{
				if(result.error())
					console.error(result.error());
				else
					console.info("Company created, ID= " + result.data());
			}
		);	


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