You need to sign in to do that
Don't have an account?

formula field not updating during actionsupport rerender
I have a custom formula field (shipping_total__c) that is the sum of two other fields (shipping1__c, shipping2__c), and I have created a visualforce page that displays the latter two fields in <apex:inputfield> tags, and the formula field in an <apex:outputfield> tag. I am trying to get the formula field to rerender with the correct amount any time the first two are modified, but the value does not change.
I suspect that the field formula is not re-calculating after it is originally retrieved from the opportunity object via SOQL on initial page display.
If I try to modify those fields,
... I get an Apex error that this field is read-only.
I *could* create a temp decimal variable and display that instead, and then update it onchange of the first two shipping values, but that seems like more work than should be necessary.
How can I force a formula field to re-render without actually committing/updating the data back to the DB first?
I suspect that the field formula is not re-calculating after it is originally retrieved from the opportunity object via SOQL on initial page display.
If I try to modify those fields,
Code:
this.opportunity.shipping_total__c = this.opportunity.shipping1__c + this.opportunity.shipping2__c;
I *could* create a temp decimal variable and display that instead, and then update it onchange of the first two shipping values, but that seems like more work than should be necessary.
How can I force a formula field to re-render without actually committing/updating the data back to the DB first?
I'm having the same issue, did you ever solve this? I can get anything else to rerender properly, but formula fields only change on a full page refresh.
thanks,
jyg
Havin gthe sames issue, any idea why Formulas will not rerender in a component?