---
schema_version: "1"
id: 1cbe782b44df08d76fd8705d8103da6ee70e3562e4e723df895d9dfb592db0ba
title: Apex
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/264-0-0/rn_apex.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 15b2ab0ee4fa6edca5afc0e2e93e3008fa2749e6906c25e591c52ca8bd0e4bbd
description: Get better performance with higher Apex heap limits. Apply elastic limits (beta) to Batch jobs and test elastic limits in nonproduction orgs. Write Apex integration tests that can share test data and call real HTTP endpoints. Filter Test Discovery API results by test level. Prevent namespace shadowing conflicts in dynamic managed Apex SOQL queries. Prepare for the Block Apex Anonymous Code Execution from Managed Packages release update. Build richer development tools with the Apex Symbol API (beta). Recompile only invalid Apex classes and triggers. Get compiler warnings for Apex saved at API versions 9.0 through 19.0.
products:
  - Cross Cloud
release: "264"
---
# Apex

Get better performance with higher Apex heap limits. Apply elastic limits (beta) to Batch jobs and test elastic limits in nonproduction orgs. Write Apex integration tests that can share test data and call real HTTP endpoints. Filter Test Discovery API results by test level. Prevent namespace shadowing conflicts in dynamic managed Apex SOQL queries. Prepare for the Block Apex Anonymous Code Execution from Managed Packages release update. Build richer development tools with the Apex Symbol API (beta). Recompile only invalid Apex classes and triggers. Get compiler warnings for Apex saved at API versions 9.0 through 19.0.

- **[Handle Larger Datasets with Increased Apex Heap Limits](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_heap_limit.htm&release=264.0.0&type=5)**  
    Handle larger datasets and perform more complex operations without hitting heap constraints. Increased Apex heap limits reduce the chance of encountering runtime limit errors that interrupt business processes. The Apex heap limit for synchronous transactions increases from 6 MB to 10 MB, and the limit for asynchronous transactions increases from 12 MB to 25 MB.
- **[Custom Sharing Reason Available on Standard Objects](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_standard_sharing_reasons.htm&release=264.0.0&type=5)**  
    Grant record access on standard objects by referencing a custom sharing reason (row cause) in Apex, the same way you do for custom objects. Previously, programmatic shares on standard objects were limited to the Manual row cause. A share that uses a custom sharing reason isn't deleted when the record owner changes, and a descriptive reason appears on the record's sharing page.
- **[Avoid Workflow Disruptions by Enabling Elastic Limits for Batch Jobs (Beta)](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_elastic_limits_batch.htm&release=264.0.0&type=5)**  
    The elastic limits beta feature is now available to Batch jobs in addition to future methods and Queueable jobs. Elastic limits helps prevent execution failures and limit exceptions when your org exceeds its standard rolling 24-hour asynchronous job limit. With this feature, you can continue to enqueue asynchronous jobs up to a higher elastic asynchronous job limit. If asynchronous jobs surpass the standard limit, the system throttles the processing rate of in-flight Batch jobs and limits new Batch jobs to 1 active job at a time.
- **[Test Elastic Limits by Overriding the Asynchronous Apex Job Limit in Nonproduction Orgs](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_elastic_limits_test_nonprod.htm&release=264.0.0&type=5)**  
    To test the behavior of asynchronous Apex jobs during elastic processing, override the standard 24-hour rolling asynchronous Apex job limit in a nonproduction org. A lower override value triggers elastic processing sooner, so you can see how asynchronous jobs behave before you turn on elastic limits in production.
- **[Test External Services and HTTP Callouts in Apex Integration Tests (Developer Preview)](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_integration_tests.htm&release=264.0.0&type=5)**  
    Write Apex integration tests that call real HTTP endpoints, including external service endpoints, without requiring mock callouts. Integration tests relax callout restrictions and transaction rollback semantics, so you can validate real service interactions and assert on actual side effects in your scratch org. With the new `@BeforeClass` annotation, you can now set up test data shared across methods within an integration test class.
- **[Filter Test Discovery API Results with the testLevel Parameter](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_discovery_api_testlevel.htm&release=264.0.0&type=5)**  
    Use the `testLevel` query parameter in the Test Discovery API to filter which test methods are returned based on their test level. The `testLevel` parameter replaces the `showAllMethods` parameter in API version 68.0 and later. The deprecated `showAllMethods` parameter is available only in API version 67.0 and earlier.
- **[Resolve Field Name Conflicts in Managed Package SOQL Queries](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_namespace_shadowing_managed_packages.htm&release=264.0.0&type=5)**  
    Prevent duplicate field name errors in managed Apex SOQL queries when your package fields and a subscriber’s custom fields share the same name. Set the `explicitNamespace` property on a `Database.QueryOptions` object and pass it as a bind variable in the SOQL `SET OPTIONS` clause. Without requiring an explicit namespace, Apex interprets both fields as belonging to your package namespace, failing the unique field name requirement enforced in API version 34.0 and later.
- **[Block Apex Anonymous Code Execution from Managed Packages (Release Update)](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_block_exec_anon_ru.htm&release=264.0.0&type=5)**  
    To strengthen subscriber org security, block managed package session IDs from authenticating anonymous Apex code. If you enable this update, installed managed packages can no longer use `UserInfo.getSessionId()` to obtain a session ID and then use the session ID to execute anonymous Apex.
- **[Build and Use Richer Development Tools with the Apex Symbol API (Beta)](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_symbol_api.htm&release=264.0.0&type=5)**  
    Access comprehensive Apex type information with the Apex Symbol API (beta). This Tooling API REST resource returns detailed metadata for built-in, custom, and dynamic Apex types, such as classes, interfaces, methods, and triggers. Use this API to power code completion in IDEs, provide context for AI agents generating Apex code, or ground setup agents answering admin questions about code.
- **[Reduce Overhead by Recompiling Only Invalid Apex Classes and Triggers](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_recompile_invalid_apex.htm&release=264.0.0&type=5)**  
    Return compilation results for Apex classes and triggers with validation errors, instead of recompiling the entire org. Access the compilation results through Setup or the Tooling API endpoint. Salesforce automatically identifies only classes and triggers that require recompilation, reducing compilation overhead and minimizing potential runtime errors. Routinely perform this targeted recompilation to prevent runtime delays during peak traffic.
- **[Get Compiler Warnings for Apex API Versions 9.0 Through 19.0](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_version_compiler_warnings.htm&release=264.0.0&type=5)**  
    Apex classes and triggers saved at API versions 9.0 through 19.0 will be retired in a future release. The Apex compiler now warns you when you compile or deploy Apex code at these API versions. To prepare for this future retirement, identify and update your Apex classes and triggers to API version 20.0 or later.
- **[Process Data 360 Data Model Objects with Apex Cursors (Beta)](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_cursors_dmo.htm&release=264.0.0&type=5)**  
    Use Apex cursors with Data 360 data model objects (DMOs) to process large SOQL query result sets in manageable chunks. Create a cursor with `Database.getCursor()`, retrieve records with `Cursor.fetch()`, and get the result set size with `Cursor.getNumRecords()`. Monitor Data 360 cursor rows, cursor instances, and Data 360 Flex Credit limits as you process DMO records.

#### See Also

- [Apex: New and Changed Items](https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_nc.htm&release=264.0.0&type=5 "These classes, enums, and interfaces are new or have changes.")
- [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode)
- [Apex Reference Guide](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ref_guide.htm)