Apex Aide apexaide

Improved Infinite Data Scrolling with the new Apex Pagination Cursors GA

By Andy Fawcett· Andy in the Cloud· ·Advanced ·Developer ·7 min read
Summary

Salesforce’s new GA release introduces a dedicated Apex pagination cursor specifically optimized for UI infinite scrolling scenarios, improving on prior Beta limitations. It offers enhanced active cursor limits, better handling of deleted records to avoid skipping data, and a 100k record limit tailored for UI needs compared to the 50M limit of standard cursors. Developers can leverage this with LWCs to efficiently paginate large datasets while maintaining cursor state across sessions, choosing between standard and pagination cursors based on their app requirements. This update helps Salesforce professionals build more reliable and scalable infinite scroll UIs with clear guidance on cursor sharing and limits.

Takeaways
  • Use Apex pagination cursors for UI infinite scrolling when record limits fit under 100k.
  • Leverage the new pagination cursor API’s deleted record handling to avoid skipped data.
  • Share cursors via platform cache to stay within active cursor limits and support multiple users.
  • Standard cursors remain available and serializable for UIs that need larger datasets.
  • Monitor pagination cursor limits and choose cursor type based on use case and sharing strategy.

Last year, Salesforce launched the Beta of Apex Cursors, allowing you to traverse up to 50M records using SOQL-derived datasets – fast forward to the upcoming Spring ’26 release and it’s now GA! Since Beta, Salesforce has been busy introducing a whole new cursor type dedicated to UI use cases. In this blog, I will cover the new UI pagination cursor type and its differences from the standard cursors; included is an updated version of the sample I provided in last year’s blog – that allows you to use LWCs infinite scrolling component to explore both modes and try them out for yourself. Why add a new pagination cursor type? The beta experience was simple and effective but had some limitations and buried within it a corner case of additional complexity that was not great for UI use cases – there are three key differences: More Cursors per 24hrs. Standard cursors have a limit of 100k active cursors per 24-hour period; this is now 200k to cater to more active users.

ApexBest PracticeLightningSalesforce API