Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have apex column to display the formula field on visualforce page.I am rendering the page on submit of the record and then displaying the newly created record.But issue is (Fiscal_Year_Start_Date__c)formula field value is displaying blank in the results section.Whereas if i go to record detail page I see the value but not on the vf page.

public class SerndingEventController {

 public SerndingEventController(){

 seriesId = ApexPages.currentPage().getParameters().get('id');
 fevent = new Fund_Event__c();
 showFields = false;

   public PageReference Save(){
   newfevenlist = new list<Fund_Event__c>();
   fevent.Series__c = seriesId;
    showFields = true;

    fevent.RecordTypeId= rectype;
    insert newfevenlist;

 return null;

 public PageReference Cancel(){
  return null;



<apex:page Controller="SerndingEventController">
<apex:form >
<apex:pageBlock title="New Funding Event" mode="edit">

  <apex:pageblockButtons location="top">
<apex:commandButton value="Submit" action="{!save}" reRender="result,fields">
<apex:commandButton value="Cancel" action="{!cancel}" immediate="true">
 <apex:pageBlockSection id="fields">
 <apex:pageBlockSectionItem >
     <apex:outputLabel value="Record Types" /> 
                <apex:selectList value="{!RecordType}" size="1">
                    <apex:selectOptions value="{!rectypes}" />

  <apex:inputField value="{!fevent.Project__c}" rendered="{!showFields==false}"/>
  <apex:inputField value="{!fevent.Status__c}" rendered="{!showFields==false}"/>
  <apex:inputField value="{!fevent.Fiscal_Year__c}" rendered="{!showFields==false}"/>
  <apex:inputField value="{!fevent.Number_of_years_of_the_Funding_Event__c}" rendered="{!showFields==false}"/>
  <apex:inputField value="{!fevent.Amount__c}" rendered="{!showFields==false}"/>
  <apex:inputField value="{!fevent.Budget_Expenses__c}" rendered="{!showFields==false}"/>
<apex:pageBlock id="result" >
     <apex:pageBlockTable value="{!newfevenlist}" var="fundevent">

    <apex:commandLink action="{!editFundingEvents}" rerender="result">Edit<apex:param name="editid" value="{!}"/></apex:commandLink>
     <apex:column value="{!fundevent.Grant__c}" rendered="{!fundevent.Id != editEvent.Id}"/>
     <apex:column value="{!fundevent.Grant__c}" rendered="{!fundevent.Id != editEvent.Id}"/>  

     <apex:column value="{!fundevent.Amt__c}" rendered="{!fundevent.Id != editEvent.Id}"/>
     <apex:column value="{!fundevent.Budget_Expenses__c}" rendered="{!fundevent.Id != editEvent.Id}"/>
     <apex:column value="{!fundevent.Fiscal_Year_Start_Date__c}"/>           

share|improve this question
up vote 3 down vote accepted

After inserting newfevenlist into the database try retrieving it out again using SOQL to get the updated formula field values.

share|improve this answer
Thanks @Daniel Ballinger.Just to retrieve one value we need to write query.I think formula fields should evaluate real time.There is an idea posted on this – sfdc Dec 18 '13 at 19:43

After you have inserted the record , I think you will have to query the field Fiscal_Year_Start_Date__c for the inserted record and use the result to display the formula field value. Implying that the formula field value has to be retrieved from the database.It will not be available automatically in your record variable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.