Activity Forums Salesforce® Discussions How to add field history as a related list of opportunity in vf page?

  • Shekhar Gadewar

    Member
    July 21, 2016 at 1:28 pm

    Hi,

    Go to profile and drag "Opportunity Field History"

  • PRANAV

    Member
    January 19, 2018 at 9:40 am

    Hi Tanu,

    You can add related list in your VF Page by using apex:detail tag.

    <apex:page standardController="Opportunity">
    <apex:detail subject="{!Opportunity.Id}" relatedList="false" title="false"/>
    </apex:page>

    OR

    You can use apex:relatedList tag. For example:

    <apex:page standardController="opportunity">
    <apex:relatedlist list="OpportunityHistories" title="Stage History"/>
    <apex:pageBlock >
    <apex:pageblocktable value="{!opportunity.Histories}" var="hist" title="opporty">
    <apex:column value="{!hist.createddate}"/>
    </apex:pageblocktable>
    </apex:pageBlock>
    </apex:page>

    Hope this helps you.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos