Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Added product line to order but does not fill unit per price filed

$
0
0

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);


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>