You need to sign in to do that
Don't have an account?
RichardR1
reRender not working on formula fields
Hi all, I created a Visualforce page where I need to rerender some formula fields (number output) but I cannot get them to rerender. I was able to do rerender on other elements in my page though, such as an html text.
<apex:page standardController="Contact" extensions="npsExtension" showHeader="false" sidebar="false"> <apex:form > <apex:actionFunction name="save" action="{!saveRecords}" reRender="k,l,m,n" /> <table > <tr > <td > <apex:outputText id="k" style="color:{!if(nps.Phone_Call__c='No','red','black')}" value="Phone Call"/> </td> <td><apex:inputField onchange="myFunction()" value="{!nps.Phone_Call__c}" /></td> <td><apex:outputField id="l" value="{!nps.Phone_Call_Score__c}" /></td> <td><apex:outputField id="m" value="{!nps.Phone_Call_Weight__c}" /></td> <td><apex:outputField id="n" value="{!nps.Relationship_Score__c}" /></td> </tr> </table > <script> function myFunction(){ save(); }; </script> </apex:page>
All Answers
As per the below answer we cannot rerender based on formula field until the record is saved. Can you check the below approaches suggested.
https://salesforce.stackexchange.com/questions/136418/how-to-render-a-formula-field-on-the-basis-of-another-input-field-in-vf-page
If this solution helps, Please mark it as best answer.
Thanks,