Salesforce Times
  • Home
  • News
  • Articles
No Result
View All Result
Salesforce Times
  • Home
  • News
  • Articles
No Result
View All Result
Salesforce Times
No Result
View All Result
Home Articles

Salesforce Summer’24 Release Notes | Apex

Antonis Melakis by Antonis Melakis
July 10, 2024
in Articles, Release Notes
0 0
0
Salesforce Summer’24 Release Notes | Apex
0
SHARES
16
VIEWS
Share on FacebookShare on Twitter

1. Use Cursors for Expanded SOQL Query Result Support

With Apex cursors, you can work with large query result sets while not actually returning the entire result set. Cursors will break up the processing of a SOQL query result into pieces that can be processed within the bounds of a single transaction. Query results can be traversed in parts, with the flexibility to navigate forward and back in the result set. Cursors are a more powerful alternative to batch Apex that can be used in a chain of queueable Apex jobs, addressing this way of batch Apex’s limitations.

How: A cursor is created when a SOQL query is executed on a Database.getCursor() or Database.getCursorWithBinds() call. When a Cursor.fetch(integer
position, integer count)
method is invoked with an offset position and the count of records to fetch, the corresponding rows are returned from the
cursor. To get the number of cursor rows returned from the SOQL query, use Cursor.getNumRecords(). You must track the offsets or positions of the
results within your particular processing scenario

Exceptions: Apex cursors throw the following new system exceptions:
– System.FatalCursorException
– System.TransientCursorException, transactions that fail with System.TransientCursorException can be retried

Limits: Apex cursors have the same expiration limits as API Query cursors:
– Maximum number of rows per cursor: 50 million (both synchronous and asynchronous)
– Maximum number of fetch calls per transaction: 10 (both synchronous and asynchronous)
– Maximum number of rows per day (aggregate limit): 100 million
– Maximum number of rows per day (aggregate limit): 100 million
To get these limits, use these new methods in the Limits class:
– Limits.getApexCursorRows() and its upper bound Limits.getLimitApexCursorRows() method
– Limits.getFetchCallsOnApexCursor() and its upper bound Limits.getLimitFetchCallsOnApexCursor() method

Apex Cursor Class Example
Previous
Next Evaluate Dynamic Formulas in Apex (Beta)
Tags: ApexSalesforce Summer '24 Release Notes
Previous Post

Salesforce Summer’24 Release Notes | Permissions and Sharing

Next Post

Salesforce Summer’24 Release Notes | General Setup

Antonis Melakis

Antonis Melakis

Next Post
Salesforce Summer’24 Release Notes | General Setup

Salesforce Summer'24 Release Notes | General Setup

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Salesforce Spring’25 Release Notes | Flow Extensions and Management
  • Salesforce Spring’25 Release Notes | Flow Builder Run-Time Changes
  • Salesforce Winter’25 Release Notes | Screen Flow Updates
  • Salesforce Winter’25 Release Notes | Flow Builder User Experience Updates
  • Salesforce Spring’25 Release Notes | Flow Builder User Experience Updates

Recent Comments

No comments to show.

Tags

Analytics Apex AppExchange Artificial Intelligence Automation Awards and Recognition Configuration Customization Data Development Digital Transformation Fields Flow Actions Flow Builder Flow Builder Updates General Enhancements General Mobile Updates General Setup Globalization Lightning App Builder Lightning Reports and Dashboards List Views Mobile Partnership Permissions and Sharing Sales Salesforce Flow Salesforce Mobile App Salesforce Overall Salesforce Partners Salesforce Spring ’25 Release Notes Salesforce Summer '24 Release Notes Salesforce Winter ’25 Release Notes Security, Identity, and Privacy User Experience
  • Home
  • News
  • Articles

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • News
  • Articles

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.