Documentation

crm.measure.add

crm.measure.add(fields)

Adds a new unit of measurement.

Parameters

Fields for adding units of measurement:

  • CODE - Code;
  • MEASURE_TITLE - Unit of measurement title;
  • SYMBOL_RUS - Symbol designation;
  • SYMBOL_INTL - Symbol designation (international);
  • SYMBOL_LETTER_INTL - Letter symbol designation (international);
  • IS_DEFAULT - By default.
Parameter Description
fields Set of fields - is an array ("field"=>"value"[, ...]), containing measurement unit fields.
Note: to find out the required field format, execute the method crm.measure.fields to view the retrieved field format.

Example

	BX24.callMethod(
		"crm.measure.add",
		{
			fields: {
				"CODE": "212",
				"MEASURE_TITLE": "Ватт",
				"SYMBOL_RUS": "Вт",
				"SYMBOL_INTL": "W",
				"SYMBOL_LETTER_INTL": "WTT",
				"IS_DEFAULT": "N"
			}
		},
		function(result)
		{
			if(result.error())
				console.error(result.error());
			else
				console.info("Unit of measurement is created with ID" + result.data());
		}
	);



© «Bitrix24», 2001-2024