Skip to Main Content

Info

Recently I ran into the Reset Pagination error again. From time to time it just rears its ugly head... :-)
It looks like this:

Invalid set of rows requested, the source data of the report has been modified.
Reset Pagination

And the html looks like this: Martin Giffy D'Souza has some comprehensive info on the cause of this error (and what to do to prevent it) here.

Normally you won't run into this - as long as you remember to always reset the pagination when linking to the page containing the report that causes the problem.
However, in my case the page with the report was accessed via "Two level tabs". I know, that is old school, but it's an old application, my hands are tied. For parent tabs you can set Reset Pagination, but for Standard Tabs there is no such option.
The link of the Standard Tab looks like this:
javascript:apex.submit('Details');
Since that is javascript, there is no obvious way to add RP to the url. Might be possible but it wouldn't be pretty.

So, I needed a way to Reset Pagination on the page itself, but of course only when the error occurred. The link we need is already shown on the page, so I created a Dynamic Action that redirects to that link.
See the Dynamic Action code below.
A few notes:
  • The eq(0) jQuery selector is added to ensure we only try this once (in case there is more than 1 report with this error on the page).
  • This will only work in English applications, since the selector searches for the literal string "Reset Pagination". You could try to look up the applicable translation (I guess using the apex_application_translations view) and use that string.
  • For this example I have set the Dynamic Action condition to Never, otherwise the page on this website would keep reloading. When you use this solution for yourself, make sure to set the condition to something else.
  • You might want to consider putting this Dynamic Action on page 0, if you have more than one page with this issue.

Code

Dynamic Action

Identification
Name
Execution Options
Sequence
When
Event
Server-Side Condition
Type
Advanced
Event Scope
True Action
Identification
Action
Settings
Code
Execution Options
Sequence
Fire On Initialization