12-31-2012 07:20 AM
I'm creating new products in a database using the follwing:
using ACTOpps = Act.Framework.Opportunities; ACTOpps.Product newp = oApp.ActFramework.Products.CreateProduct(Description, StockCode, Convert.ToDecimal(sPrice), Convert.ToDecimal(sCost));
Which seems to work fine but I then want to update some of the values later. Can someone help me with this?
As an example, I may want to change the price at a later date
Thank you :-)
01-02-2013 07:56 AM
To do this, get the products from and existing opportunity (OpportunityProducts)
oppProdList = existingOpp.GetProducts(null);
From there you can set any of the fields for that product.
oppProdList.Price = 1;
This will altar the values for a product of an existing opportunity. To change the product itself, get the list of products:
ProductList myProducts = ActApp.ActFramework.Products.GetProducts(null);
myProducts.Cost = 1;