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


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