You need to sign in to do that
Don't have an account?
How can I apply a "1/3" discount?
I have a $25 product. If I create an Opportunity Line Item with a quantity of 12, my total price is $300. I want to discount the Total Price to $200 (a 1/3 discount).
If I enter a discount percentage of 33.33333%, it gets rounded or truncated to 33.33%, and my Total Price ends up at $200.01.
Any ideas how I can I get my Total Price to $200?
Resolution was to contact salesforce support and have them activate an option that makes 8 decimal places available on standard fields
All Answers
I'm sure someone will have a better answer. But I got it working correctly with the following anonymous Apex.
If that's what you're looking for it wouldn't be hard to implement that in an Apex class even though I played with it using anonymous Apex.
Hi,
You can refer to math functions like ceil & floor in salesforce.
Here is link which consists of math functions in salesforce.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_math.htm
Thanks,
Sachin.
Thanks for the responses.
To clarify, "Total Price" is a standard Opportunity Product field that is formula based (Sales Price * Quantity), and I am unaware of any way to override this behavior. Sachin, are you suggesting that it is possible to override the standard behavior of the Total Price field with Apex code?
I also looked at the "Sales Price" field. This standard field only allows two decimal places. I don't see any way to change this, but if it could be changed to 6 decimal places, that would solve the problem.
Seems like such a simple problem. Lots of companies deal with fractions of pennies in their pricing all the time. Is Salesforce really not capable of handling this?
Resolution was to contact salesforce support and have them activate an option that makes 8 decimal places available on standard fields