Dear all;
i am trying to update the order product through plugin but i am receiving the following error
The price cannot be overridden while the entity is locked
i tried the below code but still not working
bool check = (bool)quote_product.Attributes["salesorderispricelocked"];if (check)
{
if (quote_product.Attributes.Contains("productid"))
{
quote_product.Attributes.Remove("productid");
}
if (quote_product.Attributes.Contains("uomid"))
{
quote_product.Attributes.Remove("uomid");
}
if (quote_product.Attributes.Contains("priceperunit_base"))
{
quote_product.Attributes.Remove("priceperunit_base");
}
if (quote_product.Attributes.Contains("priceperunit"))
{
quote_product.Attributes.Remove("priceperunit");
}
service.Update(quote_product);
}
else
{
service.Update(quote_product);
}