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

Create SalesOrderDetail in Plugin No Populate Amount

$
0
0

Hi Guys,

If anyone can help me with this, really appreciatte, i write a plugin that create a Sales Order Detail for Order, but whn i created the amount not bring back automatically from Price list, buen when i added manually it does, my code:

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

                    orderProduct.Attributes.Add("salesorderid", new EntityReference("salesorder", id_pedido));
                    orderProduct.Attributes.Add("productid", new EntityReference(producto.LogicalName, producto.Id));
                    orderProduct.Attributes.Add("quantity", Convert.ToDecimal(1));
                    orderProduct.Attributes.Add("uomid", new EntityReference("uom", producto.GetAttributeValue<EntityReference>("defaultuomid").Id));
                    service.Create(orderProduct);


And no calculate amount and totals, but the product is in the PreceList with amount.

Thanks.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



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