[SalesForce] Display History tracking section in visualforce standardcontroller

I am using standard controller of a custom object called Enagements__c to display details of the record in VF Page. I want to use the standard feature of '<apex:relatedlist' and display all the related list for that object.

I am not able to display the history tracking section and giving a strange error, even though i give the child relationship name correctly it still gives me a error.

<apex:relatedList list="Engagements__history"/>

Error i get when see the output is :

'Engagements__history' is not a valid child relationship name for entity Engagements

I am confused since when query the history tracking from SOQL it works fine which shows that relationship name is correct

SELECT Id, customfield__c, (SELECT OldValue, NewValue FROM
Enagements__history) FROM Engagements__c

How do we get the history tracking relatedlist of a customobject to use

<apex:relatedList list="Engagements__history"/>

Best Answer

This is not possible out of the box. Here you can find a custom component created by John De Santiago - one of the most advanced "native looking" History list recreations.

Related Topic