Find your content:

Search form

You are here

Visualforce page throws error if refreshed after a while


I have built a customer portal using sites. All of the UI is custom built using VF pages with apex controllers. I am displaying some records using pagination with the standard set controller. I basically run a SOQL query, store the results in a list and bind that to a Apex:DataTable and display that data to the user.

Everything is fine except for when I leave a page showing the data for a while and then refresh it, it causes a visualforce error. The debug logs have been of no help. Its as if some kind of timeout or the data has "expired". Has anyone of you come across this error. How can I overcome this or resolve it gracefully instead of having the page crashing.

This is the way I am populating my list from the SOQL query results:

invoiceDetails = [SELECT idtl.Product__c, idtl.Quantity__c, idtl.Unit_Price__c, 
                         idtl.tax__c, idtl.Amount__c 
                         FROM Invoice_Detail__c idtl where idtl.Invoice__c=:invID
                         ORDER BY idtl.Product__c];

Attribution to: Richard N

Possible Suggestion/Solution #1

This is a known QueryLocator Bug-Feature:

The queryLocator value expires automatically after 15 minutes of inactivity.

Here is the official SF-Doc: QueryLocator

Attribution to: Sergej Utko
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content