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
Jeff BloomerJeff Bloomer 

Dynamic Search With Next and Previous Links

I have a version of this Dynamic Search that I've placed into a SFDC site.  Just curious if anyone has adapted it to have NEXT and PREVIOUS buttons.  I'm thinking it may be too kluge to implement, but if anyone has an answer, I would be very grateful.  Thanks in advance!




I've implemented paging many times. You basically need to just use a StandardSetController, and pass the query into the Database.getQueryLocator function, then bind the result list to an enhanced list element. I believe there's an example in the docs if you look up the StandardSetController.




If you don't have to use a standardSetController, you can also implement pagination by using the "FIRST" attribute in <apex:pageBlockTable> and <apex:repeat>


I have this example shared here if you want to give it a try: