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
Data Migration 5Data Migration 5 

How to move from current record to next record with in a list view?

We all know that Salesforce doesnt have out of the box button to move from current record to next/previous record with in a list view?

What is the best solution to accomplish to overcome this problem? Any sample codes for creating buttons to move onto next/previous record will be appreciated.
scottbcovertscottbcovert
Hi Data Migration 5,

Perhaps you could have a button to a Visualforce page that uses an Apex controller to run a SOQL query to return the equivalent records from a particular list view. The VFPage could take the 'current' record id as a parameter and find its index within the results and then redirect the user to the next/previous record based on a second url parameter. That said, it might be easier to just train users to go back to the list view or open records in new tabs on the browser.