Tuesday, 25 March 2014

Trying to Write a Formula Field for Margin % on Products at List Price

Question:

I am trying to have a field on products that simply shows the margin % for the product code at list price. (List Price - Product Cost) / List Price.

To do this... I need to get a look- up into the Price List... but am so lost on how Salesforce doesn't allow you to look up into the Standard Price Book (List Price) from Products.

Any ideas on how to get Standard Cost (PriceBook2/Pricebook Entry/etc...) brough into the Product Object so I can have this field calculate.

Using this to ensure our list prices on products are appropriate based on our list margin targets.

Thanks!




Answer 



There is no simple solution for your requirement especially if you have multicurency enviroment. You can not retrieve prices from pricebookentry via formula or workflow rule or via some quick&simple approach.  I would need to do some coding in order to achieve something like that.

I would think in the following directions:
- when setting up product prices make sure that price is also set in some custom field in the product itself; not just in the pricebookentry
- if above is not acceptable then you can do some apex batch code that would automaticaly fill your product price custom field on the product from the pricebook entry. Though, this requires deeper knowledge in apex development.
 

No comments:

Post a Comment