-
Notifications
You must be signed in to change notification settings - Fork 24
MobileCRM.UI.EntityForm.executeCommandByName
rescocrm edited this page May 15, 2023
·
9 revisions
[v8.1] Execute the command with the passed name. The command must exist and must be enabled.
| 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);
}