Formula to subtract discount percentage from List Price - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Jason KlassJason Klass 

Formula to subtract discount percentage from List Price

I'm trying to write a workflow field update rule that will automatically subtract the discount from the List Price on Opportunity Products and populate the discounted price in the Sales Price field.

I first tried this:

ListPrice - Discount

But for some reason, it doesn't seem to recognize the Discount field as a percent.  So then I tried this:

(ListPrice) -  (Discount / 100 * ListPrice)

But that didn't work either.  The math seems to be right but maybe my syntax is wrong?  Any suggestions
Steve MolisSteve Molis
Can you post screenshots of the WFR and Field Update?  Can you confirm that Discount is a Percent datatype?  

Your formula should be something like this:  

(ListPrice - (Discount * ListPrice))
Jason KlassJason Klass
Thanks Steve.  But when I do that formula, the sales price is correct, but the total is incorrect.  It looks like the discount is applied twice.User-added image
Steve MolisSteve Molis
Okay, I thought that you were doing this for a custom override.  The standard Discount Field is automatically applied to the standard Sales Price / Sub-Total fields
Jason KlassJason Klass
Hi Steve,
It doesn't in ours.  Even if we fill in the discount field, the sales price stays the same as the list price.  Am I missing something?
Steve MolisSteve Molis
Can you post screenshots of the Opportunity Product fields on your SFDC org and make sure you don't have any custom/renamed fields?
Jason KlassJason Klass
OK, so here is what it looks like when the workflow rule is deactivated.  Notice that even thought there is a discount, it doesn't take it off the Sales Price.  The Sales Price is the same as the List Price:

When I activate the workflow rule, the sales price is correct, but then the total is off.  It looks like the discount is being applied twice:

Here is a screenshot of the workflow rule:

Jason KlassJason Klass
I don't know if this makes a difference or not but our price books are set to use the list price for the sale price.  Could that be preventing the sales price field from updating when we enter a discount?
Steve MolisSteve Molis
Hi Jason,
the standard SFDC Opportunity Product.Discount% is automatically applied to the Sales Price to calculate the Total Price for the Line Item.  By applying the Discount% to the List Price you're deducting it twice.  
Jason KlassJason Klass
Steve, then why doesn't the Sales Price display the discount?  As you can see from the screen shots, even when I add a discount, the list price and sales price are the same. 
Kellie StoeltingKellie Stoelting
Hi Jason, I'm experiencing the same issue where the Sales Price doesn't update when I enter a Discount (although behind the scenes Salesforce is calculating the discount on the subtotal)  and I wonder if you ever received an answer as to why that was happening for you.

Any insight you can offer would be greatly appreciated.

Leigh HavelkaLeigh Havelka
Hi there, old thread I know but this is the problem I'm having. Is the Sales Price meant to be updated when a Discount is entered?  Thanks!
Rebecca GrantRebecca Grant
I don't believe sales price is meant to be updated when a discount is entered. Rather the discount is meant to be applied in the Total Price. 

Here is how Total Price is calculated:

If users are editing Sales Price and Discount, then a double discount will be applied to Total Price.