update formula when script updates fields druring edit

update formula when script updates fields druring edit


I have a formula field that sums the total value of several decimal fields.

Example:
Formula 1 = Decimal field 1 + Decimal field 2 + Decimal field 3

I have some on edit scripts that update the decimal fields with certain decimal values when a user changes certain fields.

My question is how can I get the formula field to update / recalculate its value when an on user input script is triggered and updates a decimal field with a new value?

It seems that when an On User input script updates one of the decimal fields the formula value is not recalculated.

The only way i can get the formula to update the value is if i manually type in and edit a value in the decimal field but it will not update when the On User input modified the decimal field value.

Any help will be appreciated.  I am using this form for quoting purposes and the formulas not updating automatically as values are changed in the form is a fail.


Thanks
Matthew