You need to sign in to do that
Don't have an account?
Shantanu Mahajan 4
Pagination for Wrapper Class
Hii all,
I am trying to paginate using Offset, but it is giving me error " System.QueryException: Maximum SOQL offset allowed is 2000"
And I cannot use Standard set Controller becuase it is giving me error " List controllers are not supported for Attachment "
So how can i do pagination now
I am trying to paginate using Offset, but it is giving me error " System.QueryException: Maximum SOQL offset allowed is 2000"
And I cannot use Standard set Controller becuase it is giving me error " List controllers are not supported for Attachment "
So how can i do pagination now
When i implemented pagination for wrapper class i use offsedId. I remember each 2000th record id and my soql look as
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
My Query is like
so how can i give offsetId??
I remember each 2000th record id. When user navigate to next page and current page contains 2000th record, i remember it, and when user click "next page" i add filter in where statement "offsetId > recordId".
for example contact table
1999. Test Contact
2000. Test Contact 2
2001. Test Contact 3
and you want query 10 records start with 2000 to 2010, for it you need remember id of 1999th contact and use this id for drop first 1999 contact. In this scenarion you offset every time should be less 2000.
Thanks,
Alex