-
Notifications
You must be signed in to change notification settings - Fork 24
MobileCRM.DynamicEntity.deleteAsync
rescocrm edited this page Jul 23, 2026
·
10 revisions
Asynchronously deletes the CRM entity record.
| 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. |
| forceMode | Boolean | (Optional) Whether to force the online or offline deletion regardless of current app mode. |
This example demonstrates how to delete an account with given id.
// WARNING: async/await pattern requires ECMAScript 6 and it's not supported on Internet Explorer.
// It's supported by all modern browsers including mobile version of Chrome and Safari (requires Android 5+ and iOS 10+).
function deleteAccount(accountId) {
return __awaiter(this, void 0, void 0, function* () {
try {
yield MobileCRM.DynamicEntity.deleteAsync("account", accountid);
onAccountDeleted(accountid);
}
catch (error) {
MobileCRM.bridge.alert("An error occurred: " + error);
}
});
}