I have this Account object, for the respective object we have one Activity History Related list.

I need to display the Activity history for Account object through VisualForce Page.

How can it be Achieve? i want to display same record into the visual force page. enter image description here

2 Answers 2


You can display the related list in a VF page using apex:relatedList tag. Following is the visualforce code to display Activity History:

<apex:page standardController="Account">
    <apex:relatedList list="ActivityHistories" title="Activity History" />

Below is the output:

enter image description here

You can refer this link: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_relatedList.htm

Let me know if it works for you.

  • Hi Ankita, it is displaying nothing for me, though i have one record for Activity History for Account. Jul 4, 2017 at 10:24
  • You need to pass the account Id in this way: For example, if 001D000000IRt53 is the account ID, the resulting URL should be: Salesforce_instance/apex/myPage?id=001D000000IRt53
    – Ankita
    Jul 4, 2017 at 10:31
  • oh yes, it worked thankyou. Jul 4, 2017 at 10:37

you need to use apex:relatedList tag

 <apex:relatedList title="Activity History"  list="ActivityHistories" />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .