MobileCRM.DynamicEntity.deleteById - Resconet/JSBridge GitHub Wiki
Asynchronously deletes the CRM entity.
Argument | Type | Description |
---|---|---|
entityName | String | The logical name of the entity, e.g. "account". |
id | String | GUID of the existing entity or null for new one. |
success | function() | A callback function for successful asynchronous result. |
failed | function(error) | A callback function for command failure. The error argument will carry the error message. |
scope | A scope for calling the callbacks; set "null" to call the callbacks in global scope. |
This example demonstrates how to delete an account with given id.
MobileCRM.DynamicEntity.deleteById("account", accountid, function () {
onAccountDeleted(accountid);
}, function (error) {
MobileCRM.bridge.alert("An error occurred: " + error);
});