Appends the product into sales order collection.
Resulting MobileCRM.DynamicEntity object implements method "update" which can be used to update the entity properties in the sales detail collection.
This example demonstrates how to add a new product into order details.
function addNewProduct(productId, quantity) { var productRef = new MobileCRM.Reference("product", productId); MobileCRM.UI.EntityForm.DetailCollection.add(productRef, function (orderDetail) { /// <param name="orderDetail" type="MobileCRM.DynamicEntity"/> orderDetail.properties["quantity"] = quantity; orderDetail.update(function (err) { if (err) MobileCRM.bridge.alert(err); else MobileCRM.bridge.alert("Product added"); }); }, MobileCRM.bridge.alert); }
There was an error while loading. Please reload this page.
Links: