+ Start a Discussion
Kuliza DevKuliza Dev 

Adding activity history to custom lead page

Hi All,

I have created a custom Lead Page using visualforce page. I am successfully able to integrate with the Lead control and use the tabStyle as Lead. Now I also want to show the activity history of the Lead in my custom page. Is there a way of doing this ? 

Please let me know if my question is not clear or any of you need any more update ?

Thanks in advance
Abu HashimAbu Hashim
Hi Kullza Dev,

You can make use of standard "LeadHistory" object and query through it to display the entries in a table. If this helps, mark as solution/answer.


Do u mean Activity as in Events and Tasks on the lead?
Kuliza DevKuliza Dev
Thanks Abu for the quick reply. I have a custom visualforce page wherein I have already defined standardcontroller="Lead" and tabStyle="Lead" in <apex:page> tag. Now for Activity History what code changes would you propose in the same <apex:page>.

Hi Kuliza,

You will have to fetch all activity history records in the controller and bind it with the VF page:

SELECT (SELECT ActivityDate, Description from ActivityHistories) FROM Lead WHERE Id =: leadId