MobileCRM.UI.EntityForm.DetailCollection.getAll - Resconet/JSBridge GitHub Wiki

Asynchronously returns the collection of the sales entity details (e.g. Order details)

Arguments

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);
⚠️ **GitHub.com Fallback** ⚠️