Calculating and updating a field within Products module
Hi, I'm trying to update the Unit Price field with a calculation based on my custom fields Purchase Price and Markup, using the Unit Price as the product sale price. It seems like I have the calculation since when I save and execute it displays correctly based on the float values but I can't figure out how to post the calculation to the Unit Price field. Here is what I have so far:
saleprice = purchaseprice
* (markup + 100) / 100;
map = Map();
map.put("Unit_Price",saleprice);
info map;
I've also got the arguments mapped for Purchase Price and Markup and have a workflow rule set up to run when either of these fields is updated. I'm almost certain this is a mapping issue- what am I missing here?