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
labaulabau 

!quicksave Action not Showing Formula Values

Hello All:

 

I am trying to build what I thought would be a fairly simple VF page. I am trying to utilize the !quicksave action to submit form values and render the result of a formula in an outputField. In this example, the sum of the inputField values are multiplied by $40 to give a setup charge:

 

<apex:page standardController="TQuote__c"> <apex:form > <apex:pageBlock title="Hello {!$User.FirstName}!"> You are viewing quote number {!TQuote__c.name}. <p/> <apex:pageblockSection columns="1"> <apex:inputField value="{!TQuote__c.ColLoc1__c}"/> <apex:inputField value="{!TQuote__c.ColLoc2__c}"/> <apex:inputField value="{!TQuote__c.ColLoc3__c}"/> <apex:outputField value="{!TQuote__c.ScrSet__c}"/> </apex:pageblockSection> <apex:commandButton action="{!quicksave}" value="Calculate"/> </apex:pageBlock> </apex:form> </apex:page>

The first time I hit the button it saves and returns the correct formula value. However, if I change the form values and submit it again, the value of the outputField stays the same. It is as if it is saving but not refreshing the new formula field value.

 

I have searched high and low in the forums and documentation with no luck. Could anyone steer me in the right direction?

Thank you so much!

 

 

labaulabau

I've even tried to AJAX-ify the page to see if the reRender tag would do something:

 

 

<apex:page standardController="TQuote__c"> <apex:form > <apex:pageBlock id="in" title="Edit Quote for {!$User.FirstName}"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!quickSave}" rerender="out, in" status="status"/> </apex:pageBlockButtons> <apex:pageBlockSection > <apex:inputField value="{!TQuote__c.ColLoc1__c}"/> <apex:inputField value="{!TQuote__c.ColLoc2__c}"/> <apex:inputField value="{!TQuote__c.ColLoc3__c}"/> <apex:inputField value="{!TQuote__c.Dollar_Value__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <apex:pageBlock id="out" title="Read View"> <apex:actionStatus startText="updating..." id="status"/> <apex:pageBlockSection> <apex:outputField value="{!TQuote__c.name}"/> <apex:outputField value="{!TQuote__c.ScrSet__c}"/> <apex:outputField value="{!TQuote__c.Dollar_Value__c}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>

 

Are formulas not re-evaluated using the !quicksave action?