Documentation

bizproc.workflow.template.update

Scope: catalog Permissions to execute: for all

The method modifies workflow template. Requires administrator access permissions. This method only updates the templates created via the method bizproc.workflow.template.add, because such templates are bound to a specific app.

Parameters

Parameter Description Available from version
ID Updated template ID.
FIELDS Array with updated parameters. The following fields can be updated:
NAME,
DESCRIPTION,
AUTO_EXECUTE,
TEMPLATE_DATA.

On attempting to update other fields, returned by bizproc.workflow.template.list - will cause no errors, but won't update anything either.

Example

function renameTemplate(id, name)
{
	BX24.callMethod(
		'bizproc.workflow.template.update',
		{ID: id, FIELDS: {'NAME': name}},
		function(result)
		{
			if(result.error())
				alert("Error: " + result.error());
			console.log(result);
		}
	);
}


© «Bitrix24», 2001-2024