-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.UI.EntityForm.DetailCollection.getAll
rescocrm edited this page May 15, 2023
·
1 revision
Asynchronously returns the collection of the sales entity details (e.g. Order details)
Argument | Type | Description |
---|---|---|
callback | function(Array) | The callback function that is called asynchronously with an array of MobileCRM.DynamicEntity objects as argument. |
errorCallback | function(errorMsg) | The errorCallback which is called in case of error. |
scope | Object | The scope for callbacks. |
This example demonstrates how to get the list of order details.
MobileCRM.UI.EntityForm.DetailCollection.getAll(function (orderDetails) {
/// <param name="orderDetails" type="Array"/>
var nDetails = orderDetails.length;
var text = "";
for (var i = 0; i < nDetails; i++) {
var detail = orderDetails[i];
var productName = detail.properties["productid"].primaryName;
var quantity = detail.properties["quantity"];
text += "Product: " + productName + " Quantity: " + quantity + " \n";
}
if (text.length > 0)
MobileCRM.bridge.alert(text);
}, MobileCRM.bridge.alert, null);