You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rescocrm edited this page May 15, 2023
·
1 revision
Deletes the sales entity detail (e.g. Order detail) by id.
Arguments
Argument
Type
Description
id
String
An id of the item to be deleted.
callback
Function
The callback function which 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 delete first existing product on order detail.
functiondeleteProduct(){// retrieve first product if exist from order detailMobileCRM.UI.EntityForm.DetailCollection.getAll(function(details){/// <param name="details" type="Array<MobileCRM.DynamicEntity>"/>if(details.length){varproduct=details[0];MobileCRM.UI.EntityForm.DetailCollection.deleteById(product.id,function(){MobileCRM.bridge.alert("Product "+product.properties.productdescription+" successfully deleted.");},MobileCRM.bridge.alert);}elseMobileCRM.bridge.alert("Order doesn't contain any product.");},MobileCRM.bridge.alert);}