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
KavitaKavita 

Dynamic Calculations

Hi,

I've created the ability to apply discounts to line items and calculate discounted sales prices etc by using validation rules and workflows.

 

However, if I update the the discount field, it doesnt re-calculate the amount.

 

How do i fix this?

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Greg HGreg H

You should be able to write a trigger to re-calculate your values after you make updates to the discount field. If a trigger is not an option then you could manually make the change via the data loader or excel connector - but that becomes a headache over time.

-greg

All Answers

Greg HGreg H

You should be able to write a trigger to re-calculate your values after you make updates to the discount field. If a trigger is not an option then you could manually make the change via the data loader or excel connector - but that becomes a headache over time.

-greg

This was selected as the best answer
KavitaKavita

I was afraid that would be the answer and I have absolutely no clue as to how to create triggers.

 

Im going to look around for a sample trigger but if yu have any more advice- would greatly appreciate it.

 

Greg HGreg H

In case you aren't aware there is Apex documentation available online at http://www.salesforce.com/us/developer/docs/apexcode/index.htm. This is a good place to start.

-greg