Hi
Using SDK I remove an old product line in order, and add a new one, but when added, it does not brind unit per price f the product and it is set to zero. But when I add it manually it works fine.
Here is my code:
var creatOrderDetail = new Entity("salesorderdetail"); creatOrderDetaill.Attributes["productid"] = new EntityReference("product",entityref.Id); creatOrderDetail.Attributes["quantity"] = Convert.ToDecimal(1); creatOrderDetail.Attributes["salesorderid"] = orderentity creatOrderDetail.Attributes["uomid"] = GetDefaultUnit(service); var orderdetailid = service.Create(creatOrderDetail);