function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rick-ProfaceRick-Proface 

Calculating Discount Price

Hi,

 

This formula works in my other programs ,but it seems SF is different. I just want to calculate the price base on a discount. I created a formula field with currency as the output and entered this formula:

 

((100- Part_Number__r.Discount_Percent__c)/100)* Part_Number__r.Temp_Price__c

 

The discount is 20% and it never calculates correctly. 

 

Any suggestions as I am new to Sales Force.

 

Thanks!

Rick

Best Answer chosen by Admin (Salesforce Developers) 
Rick-ProfaceRick-Proface

I figured it out. Even though the percentage shows for example 20% in a percent field, the data stored in the database as .2   After figuring this out the it was easy to redo the calculation to get the correct discount...

 

I'm sure I have alot to learn as I get further into SF....