How do I Reference a custom objects history on Visual Force page with apex:relatedList

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite
1












I have a custom object called service_request__c
It has field history tracking enabled and is displayed with a custom visual force page. I have other related list that work just fine using something like



<apex:relatedList list="CombinedAttachments" id="notes2" subject="!$CurrentPage.parameters.id"/>


However I've tried many things and cannot get the Field tracking history to show with a related list.
How do I accomplish reference the field history for my custom object










share|improve this question



























    up vote
    1
    down vote

    favorite
    1












    I have a custom object called service_request__c
    It has field history tracking enabled and is displayed with a custom visual force page. I have other related list that work just fine using something like



    <apex:relatedList list="CombinedAttachments" id="notes2" subject="!$CurrentPage.parameters.id"/>


    However I've tried many things and cannot get the Field tracking history to show with a related list.
    How do I accomplish reference the field history for my custom object










    share|improve this question























      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      I have a custom object called service_request__c
      It has field history tracking enabled and is displayed with a custom visual force page. I have other related list that work just fine using something like



      <apex:relatedList list="CombinedAttachments" id="notes2" subject="!$CurrentPage.parameters.id"/>


      However I've tried many things and cannot get the Field tracking history to show with a related list.
      How do I accomplish reference the field history for my custom object










      share|improve this question













      I have a custom object called service_request__c
      It has field history tracking enabled and is displayed with a custom visual force page. I have other related list that work just fine using something like



      <apex:relatedList list="CombinedAttachments" id="notes2" subject="!$CurrentPage.parameters.id"/>


      However I've tried many things and cannot get the Field tracking history to show with a related list.
      How do I accomplish reference the field history for my custom object







      visualforce related-list






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      Ohmicron

      288313




      288313




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          You use the Histories object. Here's a demo page:



          <apex:page standardController="service_request__c">
          <apex:relatedList list="Histories"/>
          </apex:page>


          There's no need to specify a subject if you use the standard controller.






          share|improve this answer






















          • Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
            – Ohmicron
            1 hour ago

















          up vote
          2
          down vote













          Spent a bit futzing about with workbench & the related list component, trying names before I googled it and found an old SO question:



          How to display History related list using <apex:relatedList> or by any other direct approach on a Visualforce page?



          TL;DR: You can't. Make your own component to display the history.




          @sfdxfox's answer says you can, but I couldn't repo it on cs67, until I updated the API version of the page I was using from v30 to v44. Make sure you're using the newest API version of your page if you still have issues. Leaving this here for anyone else who has the same issue.






          share|improve this answer






















          • That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
            – battery.cord
            2 hours ago










          • History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
            – battery.cord
            2 hours ago










          • Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
            – battery.cord
            2 hours ago






          • 1




            Looks like we cross comments. Anyways, yeah, version issue sounds about right.
            – sfdcfox
            2 hours ago






          • 1




            Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
            – Ohmicron
            1 hour ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "459"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f234215%2fhow-do-i-reference-a-custom-objects-history-on-visual-force-page-with-apexrelat%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          You use the Histories object. Here's a demo page:



          <apex:page standardController="service_request__c">
          <apex:relatedList list="Histories"/>
          </apex:page>


          There's no need to specify a subject if you use the standard controller.






          share|improve this answer






















          • Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
            – Ohmicron
            1 hour ago














          up vote
          2
          down vote



          accepted










          You use the Histories object. Here's a demo page:



          <apex:page standardController="service_request__c">
          <apex:relatedList list="Histories"/>
          </apex:page>


          There's no need to specify a subject if you use the standard controller.






          share|improve this answer






















          • Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
            – Ohmicron
            1 hour ago












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          You use the Histories object. Here's a demo page:



          <apex:page standardController="service_request__c">
          <apex:relatedList list="Histories"/>
          </apex:page>


          There's no need to specify a subject if you use the standard controller.






          share|improve this answer














          You use the Histories object. Here's a demo page:



          <apex:page standardController="service_request__c">
          <apex:relatedList list="Histories"/>
          </apex:page>


          There's no need to specify a subject if you use the standard controller.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 2 hours ago









          sfdcfox

          230k10177391




          230k10177391











          • Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
            – Ohmicron
            1 hour ago
















          • Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
            – Ohmicron
            1 hour ago















          Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
          – Ohmicron
          1 hour ago




          Thanks sfdcfox. I also had to bring the api version of the page up like @battery.cord says below before it worked. I tried to change api version to v44 as he said through eclipse but the actual version in the SF org didn't change. I did it directly through salesforce interface and highest available to me was v43 and that worked. Thanks to both of you for the help
          – Ohmicron
          1 hour ago












          up vote
          2
          down vote













          Spent a bit futzing about with workbench & the related list component, trying names before I googled it and found an old SO question:



          How to display History related list using <apex:relatedList> or by any other direct approach on a Visualforce page?



          TL;DR: You can't. Make your own component to display the history.




          @sfdxfox's answer says you can, but I couldn't repo it on cs67, until I updated the API version of the page I was using from v30 to v44. Make sure you're using the newest API version of your page if you still have issues. Leaving this here for anyone else who has the same issue.






          share|improve this answer






















          • That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
            – battery.cord
            2 hours ago










          • History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
            – battery.cord
            2 hours ago










          • Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
            – battery.cord
            2 hours ago






          • 1




            Looks like we cross comments. Anyways, yeah, version issue sounds about right.
            – sfdcfox
            2 hours ago






          • 1




            Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
            – Ohmicron
            1 hour ago














          up vote
          2
          down vote













          Spent a bit futzing about with workbench & the related list component, trying names before I googled it and found an old SO question:



          How to display History related list using <apex:relatedList> or by any other direct approach on a Visualforce page?



          TL;DR: You can't. Make your own component to display the history.




          @sfdxfox's answer says you can, but I couldn't repo it on cs67, until I updated the API version of the page I was using from v30 to v44. Make sure you're using the newest API version of your page if you still have issues. Leaving this here for anyone else who has the same issue.






          share|improve this answer






















          • That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
            – battery.cord
            2 hours ago










          • History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
            – battery.cord
            2 hours ago










          • Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
            – battery.cord
            2 hours ago






          • 1




            Looks like we cross comments. Anyways, yeah, version issue sounds about right.
            – sfdcfox
            2 hours ago






          • 1




            Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
            – Ohmicron
            1 hour ago












          up vote
          2
          down vote










          up vote
          2
          down vote









          Spent a bit futzing about with workbench & the related list component, trying names before I googled it and found an old SO question:



          How to display History related list using <apex:relatedList> or by any other direct approach on a Visualforce page?



          TL;DR: You can't. Make your own component to display the history.




          @sfdxfox's answer says you can, but I couldn't repo it on cs67, until I updated the API version of the page I was using from v30 to v44. Make sure you're using the newest API version of your page if you still have issues. Leaving this here for anyone else who has the same issue.






          share|improve this answer














          Spent a bit futzing about with workbench & the related list component, trying names before I googled it and found an old SO question:



          How to display History related list using <apex:relatedList> or by any other direct approach on a Visualforce page?



          TL;DR: You can't. Make your own component to display the history.




          @sfdxfox's answer says you can, but I couldn't repo it on cs67, until I updated the API version of the page I was using from v30 to v44. Make sure you're using the newest API version of your page if you still have issues. Leaving this here for anyone else who has the same issue.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 2 hours ago









          battery.cord

          6,41151742




          6,41151742











          • That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
            – battery.cord
            2 hours ago










          • History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
            – battery.cord
            2 hours ago










          • Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
            – battery.cord
            2 hours ago






          • 1




            Looks like we cross comments. Anyways, yeah, version issue sounds about right.
            – sfdcfox
            2 hours ago






          • 1




            Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
            – Ohmicron
            1 hour ago
















          • That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
            – battery.cord
            2 hours ago










          • History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
            – battery.cord
            2 hours ago










          • Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
            – battery.cord
            2 hours ago






          • 1




            Looks like we cross comments. Anyways, yeah, version issue sounds about right.
            – sfdcfox
            2 hours ago






          • 1




            Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
            – Ohmicron
            1 hour ago















          That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
          – battery.cord
          2 hours ago




          That's exactly what I did with one of the custom objects on my org, and I get "'Histories' is not a valid child relationship name for entity CustomObject" when I try to load the page with an id w/ valid history records under the table.
          – battery.cord
          2 hours ago












          History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
          – battery.cord
          2 hours ago




          History Tracking is enabled, and I can access the records history via the Custom_Object__History table. My page looks exactly like yours, a standardController and a single relatedList node. But loading the page provides the error.
          – battery.cord
          2 hours ago












          Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
          – battery.cord
          2 hours ago




          Found it - API version problem. The page I was using was set to version 30! Moving that up to v44 fixes the problem.
          – battery.cord
          2 hours ago




          1




          1




          Looks like we cross comments. Anyways, yeah, version issue sounds about right.
          – sfdcfox
          2 hours ago




          Looks like we cross comments. Anyways, yeah, version issue sounds about right.
          – sfdcfox
          2 hours ago




          1




          1




          Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
          – Ohmicron
          1 hour ago




          Eclipse looked like it change my version but apparently v44 wasn't available in my Sandbox so I went directly into salesforce and changed the version to the highest available (v43 for me) and then it worked
          – Ohmicron
          1 hour ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f234215%2fhow-do-i-reference-a-custom-objects-history-on-visual-force-page-with-apexrelat%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery