-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.UI.EntityForm.DetailCollection.getAllAsync
rescocrm edited this page May 15, 2023
·
1 revision
Asynchronously returns the collection of the sales entity details (e.g. Order details)
This example demonstrates how to get the list of order details.
return __awaiter(this, void 0, void 0, function* () {
// 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+).
try {
var orderDetails = yield MobileCRM.UI.EntityForm.DetailCollection.getAllAsync();
var text = orderDetails.map(function (detail) {
return "Product: " + detail.properties["productid"].primaryName +
", Quantity: " + detail.properties["quantity"];
}).join("\n");
if (text.length > 0)
MobileCRM.bridge.alert(text);
}
catch (err) {
MobileCRM.bridge.alert(err);
}
});