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

Salesorderdetail doesnot populate amount from product on Order, CRM 2015

$
0
0

 have created a plugin in which i am creating Sales Order and then creating salesorderdetail (sales order products) dynamically. everything is working fine, products are shown correctly in the sub grid on order form but there is no price on the products at all.

i am using following code to create sales order product, when i create quote then quote product using same code (changing entity and references to quote) then later converting that quote to an order everything is fine all prices quantity but however when i creating order and order product directly not working. please suggestt.

var orderProduct = new Entity
{
    LogicalName = "salesorderdetail"
};

orderProduct.Attributes.Add("salesorderid", new EntityReference("salesorder", OrderId));
orderProduct.Attributes.Add("productid", new EntityReference(product.LogicalName, product.Id));
orderProduct.Attributes.Add("quantity", Convert.ToDecimal(1));
orderProduct.Attributes.Add("uomid", new EntityReference("uom", uom.Id));

_service.Create(orderProduct);

Viewing all articles
Browse latest Browse all 55831

Trending Articles



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