Hello,
I have done this code for updating order product. Value is not updated and also not getting any error.
// Instaniate an salesorderdetail object.
Entity orderProduct = new Entity("salesorderdetail");
// Create a column set to define which attributes should be retrieved.
ColumnSet salesOrderDetailAttributes = new ColumnSet(new string[] { "baseamount" });
// Retrieve the salesorderdetail and its name and ownerid attributes.
orderProduct = service.Retrieve(orderProduct.LogicalName, Id, salesOrderDetailAttributes);
//get value of base price of order product
decimal tempPrice = ((Money)orderProduct["baseamount"]).Value;
if (typePrice !=0)
tempPrice = typePrice + tempPrice;//add type price value
if (mountingStylePrice != 0)
tempPrice = mountingStylePrice + tempPrice; //add mountingStyle Price value
if (substratePrice != 0)
tempPrice = substratePrice + tempPrice;//add substrate Price value
orderProduct["extendedamount"] = new Money(tempPrice);
service.Update(orderProduct);
Plugin run sucessfully but extendedamount not updated.
Thanks,
keyur shah
*This post is locked for comments
I have the same question (0)