function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

RelatedList | VisualForce Page



i have a little Problem with my VF-Page.

I would like to implement some related lists into the VF-Page, until now it works very well.


But now i would like to use some other Related List e.g. "Account History"  <apex:relatedList list="AccountHistories" /> or <apex:relatedList list="AccountHistory" /> doesn`t work.


Any Ideas or a proposal for solution?


Txs. in advanced



Vanessa BarrosVanessa Barros

once i made this in a VF page


<apex:form >
        <small><apex:pageBlock title="Actividades"> </small>
        <apex:pageBlockTable value="{!Account.ActivityHistories}" var="ha">
                <apex:column >
                    <apex:inputfield value="{!ha.ownerId}"/>


There is no standard Account History relatedlist in account object but Activityhistory and Approval history relatedlist exists. You can include these relatedlist in visualforce pages.


<apex:relatedList list="ActivityHistories" subject={!Account}/>




     If you want to display the account history in visual force page first you have to enable the set history tracking and add that related list in acconts object pagelay out, after that you tried on your visual force page.


Goto set up-->customixe-->accounts-->fields-->there is a button i.e set historu tracking--> and then check the check oxes which you want to display in history tracking-->save.


Then go to page lay out of accounts-->related list-->add account history related list.


And come to your account records--> go to edit--> and do some changes in account record-->save--> and see the related list account historu its having the history of modification which you have done.  And use that related list in visual force page using the same code.