set quote product price manually and not using pricelist RRS feed

  • General discussion

  • Hi

    I create a quote by code, and I add its product as follow, I want to enter product price manually and not using Price List , but I dont know how to save "Currency" value into "Price Per Unit" attribute. 

    ntity quotedetail = new Entity("quotedetail"); quotedetail["quoteid"] = quote; quotedetail["productid"] = new EntityReference("product", GetProductId(item.Product)); quotedetail["quantity"] = Convert.ToDecimal(item.Quantity);

    quotedetail["priceperunit"] = ???

    quotedetail["uomid"] = new EntityReference("uom", GetDefaultUnit()); service.Create(quotedetail);

    May I use type casting like (float)productprice ?

    Sunday, February 2, 2014 2:40 PM