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
Ketan Solanki29Ketan Solanki29 

Visualforce Error Invalid QueryLocator

When i am loging to application and execute the AccountDetail page after some idle time( approximatly after 10 minutes) i get the error  "This page uses a QueryLocator that is invalid.There is a limit of 5 QueryLocators per user".


Anybody tell me why this happening ? how can i prevent this Visualforce Error....


Can you provide the page and controller code?  (if it isn't too long)


This is the limitation of using QueryLocator. I guess you are using standard set controller for pagination. If the page is idle for 10-15 minutes around, it automatically dies. it is alive only for 10-15 minutes after that you have to refresh the page. 



is  there  any  possible  way  to handle this  in  my case iam getting the  same     error  when   using SearchResults = new ApexPages.StandardSetController(database.getQueryLocator(soql))