+ Start a Discussion
WenLong TanWenLong Tan 

Formula field is unable to be shown in VF page

Hi, 

I add a new formula field Complete_Date__c in a custom object named TDR, and want it shown in a VF page: 
<apex:outputField value="{!tdr.Complete_Date__c}" />
And I have added its readonly access to proper profile and permission set. 
But it is still blank in VF page. 
Anybody saw a similar issue before? thanks. 

Regards,
Tan Wenlong
Soundar Rajan PonpandiSoundar Rajan Ponpandi
Hi WenLong Tan ,

Formula filed can display in visualforce page as well .

For example : - 

You are creating a date formula filed in Account object, you would call like below code
 
<apex:outputField value="{!Account.Complete_Date__c}" />

Note : may i know how this variable name is coming here " tdr "  <apex:outputField value="{!tdr.Complete_Date__c}" /> & Are you sure you did pass the ID of parent Object ??

For Example : 

https://c.ap5.visual.force.com/apex/Testpage?id=0017F000009bCYj

Regards,
Soundar.
sourajking@gmail.com
WenLong TanWenLong Tan
Hi Soudar, 

Thanks for your reply. 
Yes, I am sure I passed the ID as parameter of VF page. 
like, https://<SFDC URL>/apex/EIT_TDR_View_VF?id=aR4Q00000008OL4

All the other fields, even including another formula are shown properly in the VF page, except for the new one.
And I checked background through SQL editor, there are values in the new field.  
It really confuses me. 

Regards,
Tan Wenlong
Soundar Rajan PonpandiSoundar Rajan Ponpandi
Hi WenLong Tan,
Cheers !!!

Please mask as Best Answer for Other's Searching Reference (For Related Search reference).

Regards,
Soundar.
Vinod AdminVinod Admin
Hi WenLong Tan,

It might be permission issue check those once.
Are you using StandardController or Custom controller?
If it is a custom controller you need to query that field from controller.
Can you please post your vf page code so that we can see what is happening.

Regards,
Vinod
rmz1411rmz1411
Hi,
Any resolution to this issue?
I am also facing similar kind of problem.

I have a managed package. It has Visualforce page with FieldSets provided to us to add our own custom fields on the VF page. I have created a custom formula field and added it to the Field set. However that field is coming as blank on the VF page. But if I go to the Standard counterpart of that page. I am able to see the field populated with the desired value. 
Can anyone help me out? How to view the field in VF Page?

Thanks
Ramit