MobileCRM.UI.EntityForm.executeCommandByName - Resconet/JSBridge GitHub Wiki

[v8.1] Execute the command with the passed name. The command must exist and must be enabled.

Arguments

Argument Type Description
command String The name of the EntityForm command.
callback function(entityForm) The callback function that is called asynchronously in case of success.
errorCallback function(errorMsg) The errorCallback which is called in case of error.
scope Object The scope for callbacks.

This example demonstrates how to execute command defined by its name. This function executes the default 'Qualify' command on the Lead entity edit form.

function onQualifyLead() {
	MobileCRM.UI.EntityForm.executeCommandByName("Qualify", function (entityForm) {
		/// <param name='entityForm' type='MobileCRM.UI.EntityForm'/>
	}, MobileCRM.bridge.alert);
}