@resconet/jsbridge 19.1.1 → 19.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/JSBridge.d.ts +7 -1
- package/src/JSBridge.js +6 -2
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -529,7 +529,13 @@ declare namespace MobileCRM {
|
|
|
529
529
|
update(callback: (error: string) => void);
|
|
530
530
|
static createNew: (entityName: string, id?: string, primaryName?: string, properties?: any) => MobileCRM.DynamicEntity;
|
|
531
531
|
static deleteById(entityName: string, id: string, sucess?: () => void, failed?: (error: string) => void, scope?: any);
|
|
532
|
-
|
|
532
|
+
/**
|
|
533
|
+
* Asynchronously deletes the CRM entity record.
|
|
534
|
+
* @param entityName The logical name of the entity, e.g. "account".
|
|
535
|
+
* @param id GUID of the existing entity or null for new one.
|
|
536
|
+
* @param forceMode Whether to force the online or offline deletion regardless of current app mode.
|
|
537
|
+
*/
|
|
538
|
+
static deleteAsync(entityName: string, id: string, forceMode?: boolean): Promise<void>;
|
|
533
539
|
static loadById(
|
|
534
540
|
entityName: string,
|
|
535
541
|
id: string,
|
package/src/JSBridge.js
CHANGED
|
@@ -2342,12 +2342,16 @@
|
|
|
2342
2342
|
var cmdParams = JSON.stringify(request);
|
|
2343
2343
|
MobileCRM.bridge.command("entitydelete", cmdParams, success, failed, scope);
|
|
2344
2344
|
};
|
|
2345
|
-
MobileCRM.DynamicEntity.deleteAsync = function (entityName, id) {
|
|
2346
|
-
/// <summary>Asynchronously deletes the CRM entity.</summary>
|
|
2345
|
+
MobileCRM.DynamicEntity.deleteAsync = function (entityName, id, forceMode) {
|
|
2346
|
+
/// <summary>Asynchronously deletes the CRM entity record.</summary>
|
|
2347
2347
|
/// <param name="entityName" type="String">The logical name of the entity, e.g. "account".</param>
|
|
2348
2348
|
/// <param name="id" type="String">GUID of the existing entity or null for new one.</param>
|
|
2349
|
+
/// <param name="forceMode" type="Boolean">(Optional) Whether to force the online or offline deletion regardless of current app mode.</param>
|
|
2349
2350
|
/// <returns type="Promise<void>">A Promise object which will be resolved after the entity record is deleted.</returns>
|
|
2350
2351
|
var request = { entity: entityName, id: id };
|
|
2352
|
+
if (forceMode === true || forceMode === false) {
|
|
2353
|
+
request.isOnlineForce = forceMode;
|
|
2354
|
+
}
|
|
2351
2355
|
var cmdParams = JSON.stringify(request);
|
|
2352
2356
|
return MobileCRM.bridge.invokeCommandPromise("entitydelete", cmdParams);
|
|
2353
2357
|
};
|