Skip to main content
5 votes
Accepted

Visualforce Pagination and Viewstate

If you're going to use remoting, consider grabbing of the ID values, then grab the records you need when you need to load a page. All of this happens client-side. Here's what your controller might ...
sfdcfox's user avatar
  • 495k
5 votes
Accepted

StandardSetController - how does it work?

The StandardSetController uses a database cursor to paginate through the results. Unlike using LIMIT+OFFSET, this method supports 10,000 rows of data, the results will not change each time a new page ...
sfdcfox's user avatar
  • 495k
4 votes

Is it possible to display 15,000 records in lightning component?

Here's a demo I wrote some time ago. The code there only queries 1,000 rows, but you could change the limit to 50,000 rows. The actual loading process will take a few seconds (I'd guess about 4-6 ...
sfdcfox's user avatar
  • 495k
4 votes
Accepted

Unknown property 'ApexPages.StandardSetController

The iteration variable in your pageBlockTable <apex:pageBlockTable value="{!ConWrapperList}" var="con"> has a namespace collision with your property public ApexPages....
David Reed's user avatar
  • 93.2k
4 votes
Accepted

How to make HttpGet service pagination with a limit of a million or more?

Simply put, you can't. While is trivial to build a service that returns, say, up to 50,000 rows, there's simply no mechanism for preserving a QueryLocator across Apex Code transactions, and with one ...
sfdcfox's user avatar
  • 495k
3 votes

SOSL search in master details objects

We cannot use relationship field in SOSL query (SELECT clause, though in WHERE condition it supports). So, better take this approach, first search in child object and take the ParentIds and then ...
Santanu Boral's user avatar
3 votes
Accepted

How do I make List 1 based rather than 0 based

Your code, as written, wouldn't compile. You're trying to assign a List<ProductWrapper> to a List<Product2>. From what I can deduce, you're actually adding one line item per asset line ...
sfdcfox's user avatar
  • 495k
3 votes

StandardSetController - how does it work?

StandardController From the docs : A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce ...
Nihar's user avatar
  • 1,182
3 votes

Global or universal pagination class used by many objects

Just use the ApexPages.StandardSetController here. This use case is exactly what it was designed for. There is no reason to reinvent the wheel. public ApexPages.StandardSetController children { ...
Adrian Larson's user avatar
  • 150k
3 votes

how to show >10000 records for pagination

You can either use client-side or server-side pagination. Either way, you won't be able to use standard tools like StandardSetController or OFFSET. Server-side, you need to use the @ReadOnly ...
sfdcfox's user avatar
  • 495k
3 votes
Accepted

Lightning Web Components lightning-datatable detect "select all" checkbox

Yes, this is possible. The datatable connectCallback function registers handlers for selectAll and deSelectAll I needed for modify the working of selectAll and Deselectall with respect to disabled ...
Mohit Gupta's user avatar
3 votes

Pagination in SOAP

When you make a RetrieveRequest where the response indicates there are further pages of results that may be retrieved, you'll receive an OverallStatus of "MoreDataAvailable" similar to this ...
Macca's user avatar
  • 8,256
3 votes
Accepted

How to paginate a html table in LWC

Paginating with lightning-datatable is just setting the table's data property to the current "view". I've demonstrated this here. import { LightningElement } from "lwc"; export ...
sfdcfox's user avatar
  • 495k
2 votes

Visualforce Search Page - SOQL Results Pagination

I would highly suggest that you look at the Salesforce StandardSetController class. It handles pagination out of the box for you and is very easy to use. There are a few 'gotchas' with support for ...
dsharrison's user avatar
  • 3,992
2 votes
Accepted

Wrapper class pagination - Constructor not defined: <Constructor>(SObject

You need to cast the sObject records returned by the StandartSetController to Product2 records. E.g. ProductWrapper pw = new ProductWrapper((Product2)p,b); Alternatively, you could do the ...
Daniel Ballinger's user avatar
2 votes
Accepted

Content cannot be displayed: Too many query locator rows: 10001

If I take an org with over 50000 Account records and run this snippet, I don't get any errors and I do get the expected output: ApexPages.StandardSetController controller = new ApexPages....
Adrian Larson's user avatar
  • 150k
2 votes

How do I persist the data in pagination

If you are only editing one value I suggest you keep a map in your controller (carried from page to page in the view state): private Map<Id, Integer> values = new Map<Id, Integer>(); and ...
Keith C's user avatar
  • 136k
2 votes
Accepted

Consume REST API pagination

There is documentation under 'Search Contacts', for example, located in the Marketing Cloud API reference material You can append the $page to your request URL, for example: www.exacttargetapis.com/...
tim_schaaf's user avatar
2 votes

Consume REST API pagination

I couldn't find a documentation reference, but was able to change the behavior and control the reported page returned by adding a URL parameter named $page. I'd still really appreciate seeing ...
Kyle Burns's user avatar
2 votes
Accepted

StandardSetController with History records

After doing a bit of research, the best approach (and maybe the only one?) is what @sfdcfox suggested: create the pagination logic in the controller. The snippet he included was: public class ...
Javier García's user avatar
2 votes
Accepted

Problem when trying to retrieve a list of records and pagination

Replace your return statement to as below and make the return type as String, In controller, return JSON.serialize(obj); And in helper parse the return value getReturnValue(); var result = JSON....
Safiya PV's user avatar
  • 669
2 votes
Accepted

Modified rows exist in the records collection! in Visualforce using input:TextArea

As per the error message indicates that the controller dataset has been modified but the changes has not been reflected in the database. Kindly call StdSetControllerCase.save(); method when are you ...
Tapas Tripathi's user avatar
2 votes

Custom controller pagination using standard set

ApexPages.StandardSetController does not require the use of Dynamic SOQL. Here's an example from the documentation for that class (linked above): ApexPages.StandardSetController ssc = new ApexPages....
David Reed's user avatar
  • 93.2k
2 votes

Is there anyway to combine StandardSetController and List

Visualforce does not automatically rerender changed attributes. To reflect changed attributes, you need to rerender the outputpanel inside which you know there are changes or else use getters. You ...
salesforce-sas's user avatar
2 votes

Apply pagination in Rest Resource

I would suggest you do the following: Add an autonumber field to Asset Adapt the queryMore pattern used in OOTB REST. Change your query to look something like this: ... WHERE MyAutoNumberField__c &...
cropredy's user avatar
  • 71.9k
2 votes

Drop down with options as incremental numbers up to a certain number

aura:iteration iterates over a collection of items; you can't use it for iteration without providing a collection. If you want to accomplish this without JavaScript, and there's a reasonably small ...
Nathanael Schmolze's user avatar
2 votes

How to increase Pagesize of REST API call response using SSJS in Cloudpage

In general,but not always the case, you can use the $page and $pageSize parameters to control this. For example: /fake/myendPoint?$page=1&$pageSize=500 would return a payload of the first 500 ...
Gortonington's user avatar
  • 30.7k
2 votes

Implement pagination on APEX REST Endpoint without using OFFSET or LastRecordID

I don't believe that Salesforce provides a REST resource to do what you're asking for. You may be able to accomplish this by (ab)using the List Views resource /services/data/v52.0/sobjects/Account/...
Derek F's user avatar
  • 62.4k
1 vote
Accepted

Cannot save record in VF and Apex

You never initialized your variable, so it's null. You just need to add a line of code to your constructor: public testRunController() { testResults = new Case_Test_Results__c(); You may also need ...
sfdcfox's user avatar
  • 495k
1 vote

VF page showing salesforce pagination using datatables

Since OFFSET clause accepts maximum value of 2000, we can't use it for a big case scenario. Instead, we need to implement custom pagination. First, query for all records Id. [SELECT Id FROM ...
Patlatus's user avatar
  • 17.2k

Only top scored, non community-wiki answers of a minimum length are eligible