Documentation

crm.automation.trigger.add

Scope: catalog Permissions to execute: for all

Method adds a trigger. Returns true or an error with description.

Parameters

Method Description Available from version
CODE Internal unique (within application) trigger identifier. Must match to the mask [a-z0-9\.\-_]
NAME Trigger name

Examples

function addTrigger(code, name)
{
	if (!name)
		name = window.prompt('Enter trigger name:');
	BX24.callMethod(
		'crm.automation.trigger.add',
		{
			"CODE": code,
			"NAME": name
		},
		function(result)
		{
			if (result.error())
				alert("Error: " + result.error());
			else
			{
				alert("Success: " + result.data());
			}
		}
	);
}
© «Bitrix24», 2001-2024