Skip to main content
Shravya Rama 님이 #Visualforce에 질문했습니다
Hello all,

I have a field Previous__c which is generated from a field update formula and shows the previous value of another field currentfield__c. Previous__c is correctly shown in standard detailpage layout but its null when I try to display it using    

<apex:outputText value="{!object.Previous__c }"/>.  I have also tried apex:outputfield, but its still the same

Can anybody suggest Where am I going wrong?

 
답변 8개
  1. 2017년 1월 2일 오후 1:19
    Hi, 

    I have implemented following code for both standard as well as custom controller

    Standard controller

    <apex:page standardController="Account">

    <apex:outputField value="{!Account.Prior_Email__c}"/><br/>

    </apex:page>

    To run this pass id in url e.g /apex/TestAcc?id=0019000001oBT31

     

    Custom Controller

    <apex:page action="{!load}" Controller="AccPrevious">

    <apex:outputText value="{!objAcc.Prior_Email__c}"/><br/>

    </apex:page>

    public class AccPrevious{

    public Account objAcc{get;set;}

    public void load(){

    objAcc=[select Prior_Email__c from Account where Name=:'test' limit 1];

    }

    }

    Please let me know if any of this works for you.

    Thanks,

    Sukanya
0/9000