Attention Salesforce Developers — we’re excited to introduce you to the Summer ’24 Release Readiness program! Salesforce has three major releases each year, and with them comes a lot to read and learn about. If you don’t have time to read the 600+ pages of release notes in full, we’ve got you covered.

The Release Readiness program provides developers with easy-to-access information on the latest release. This blog post will serve as your hub for the Summer ’24 release, where you can quickly scan for the latest features and functionality updates to the Salesforce Platform, our AI and data tools, enhancements to Apex and Lightning Web Components, APIs, integrations, and even more!

And that’s not all. You can learn more about the latest release by watching Release Readiness Live on Thursday, May 30, 2024, at 9 a.m. PST, or listening to it in podcast format.

Be sure to read, bookmark, and come back to this post any time you have questions about the Summer ’24 release.

Want to get release ready? Let’s get started!

Summer ’24 Salesforce Platform updates

Summer ’24 is packed with innovations. Whether you work with the Salesforce Platform, Data Cloud, or Einstein 1 Studio, these innovations improve your quality of life as a developer.

Apex enhancements

Support for five-level SOQL relationship queries

  • Apex now supports SOQL relationship queries that traverse up to five levels of parent-child records. Note that this was previously supported only in REST APIs.

Below is an example showing a SOQL statement with five levels of parent-child records.

It’s important to note that each parent-child relationship subquery is counted as an aggregate query. The limit for the number of aggregate queries in an Apex transaction is three times the SOQL query limit. This means that for synchronous transactions, the maximum number of aggregate queries you can have is 300. For the example code above, the number of aggregate queries is four. You can get this info using Limits.getAggregateQueries().

FormulaEval class (Beta)

  • Use the FormulaEval class (Beta) to construct and evaluate formulas at Apex runtime. Use the new Formula.builder() method to create an instance of the FormulaBuilder to configure the formula.

Below is a simple example that shows how to create an instance of the FormulaBuilder class and evaluate a formula. Notice that it now supports sObjects in addition to the user-defined Apex class.

Apex Cursors (Beta)

  • Introducing Apex Cursors (Beta)! Apex cursors enable the processing of large SOQL query results in smaller batches within a single transaction, avoiding the need to retrieve the entire result set at once. When used with Queueable Apex, they streamline the handling of extensive query results.

Below is an example code that shows how to use Apex cursors with Queueable to process a large number of files.

New InvocableVariable modifiers

  • You can set a default value for an input parameter using the new defaultValue modifier. You can also now provide a custom placeholder text and additional guidance for input parameters using the placeholderText modifier. The defaultValue and placeholderText modifiers appear in Flow Builder for the Action elements corresponding to an invocable method.

Below is an example code showing the new modifiers.

Support for standard fields in the getRelationshipOrder method

  • When you call the DescribeFieldResult.getRelationshipOrder method for a standard field, it now returns 0 if the field is the primary relationship field, or 1 if the field is the secondary relationship field.

Improved Apex exception emails

  • When your Apex code encounters unhandled exceptions, the Apex exception emails now include the organization name, user name, and My Domain name where the exception occurred.

Efficient Apex scheduled job monitoring

  • Schedule and manage Apex jobs from the All Scheduled Jobs page using a cron expression. You can also pause and resume jobs from this page.

View the ID of the associated CronTrigger object for scheduled jobs in the details list

  • Improved error messages are available for scheduled and batch Apex when you delete a class used by a scheduled or batch job. The error message includes the related batch Job ID.

LWC enhancements

Make your LWC component available via URL using the lightning__UrlAddressable target

  • You can now make LWCs URL-addressable, so you no longer need to embed your LWCs within an Aura component to make them URL-addressable. See code examples in the documentation to explore how to navigate to a URL-addressable component and pass state.

Use the utility bar with LWC components

  • A new lightning/platformUtilityBarApi LWC module has been introduced, providing API methods to manage utilities within the utility bar, so you no longer need to work with Aura components to control utilities. Check the official documentation to learn more about the Utility Bar API methods.

LWC features available in 61.0 as a part of API versioning

Salesforce has been versioning LWCs since Winter ’24. With the latest API version 61.0, the new features below are now available:

  • Use ElementInternals Web API in LWC

    • The ElementInternals API (see docs) is part of the custom elements API, allowing developers to manage a custom element’s internal states and participate in form submissions and validations.
    • You can now use the ElementInternals web API, enabling your LWC components to interact seamlessly with the HTML <form> element. This makes it easier to create custom form controls that are fully accessible and integrate well with standard HTML forms. Check the official documentation for code snippets and examples.
  • Lifecycle hooks using native browser APIs

    • Lifecycle hooks using native browser APIs behave differently compared to lifecycle hooks that we had originally as a part of synthetic polyfill. Starting with LWC API version 61.0, LWCs use only native browser APIs to fire lifecycle hooks.
    • The above change aligns with modern browser standards and resolves common memory leaks caused by inconsistent firing of the disconnectedCallback(). To learn the differences and what actions you have to take, see the documentation.
  • Integration of third-party Web Components (Beta)

    • You can integrate third-party Web Components into Lightning Web Components (Beta feature). If you have a component built using Web Components, you don’t have to rebuild it as an LWC. See the documentation to explore code examples and learn how to pass data between your LWC and the embedded third-party web component.
  • Base component updates for future native shadow support

    • We continue updating Base components to prepare for future native shadow support. See the documentation to find the list of base components updated in this release.
  • Avoid styling anti-patterns for LWCs

    • Due to an optimization that improves render time, values for style and class attributes of your static nodes can render with extra whitespaces or unexpected characters. Be sure to revise the JavaScript code to use a selector that disregards whitespaces.

Modal navigation behavior

  • When using the lightning/navigation module in LWC quick actions, newer modals overlay and stack on top of previous modals by default. To automatically close the previous modal when navigating, set replace to true.

New LWC components for Field Service Mobile

  • Create a Lightning web component (LWC) that uses the Near Field Communication (NFC) plug-in to streamline business processes and accelerate data exchange.
  • Create a Lightning web component (LWC) that uses the Space Capture plug-in to capture an image showing the layout of a space. The LWC uses the device’s native Lidar capability to capture 2D and 3D measurements within the Field Service mobile app.

Data Cloud highlights

In the age of AI, data is the new currency! Salesforce Data Cloud brings data integration and harmonization capabilities to the Salesforce Platform, allowing you to unify large volumes of data from multiple systems and unlock its potential through automation and AI for delivering personalized customer experiences at scale.

The Summer ’24 release seamlessly integrates Data Cloud with Salesforce, enabling you to leverage your data using familiar skills like creating reports, automating processes with flows or Apex, and providing a consistent experience.

Static SOQL for Data Cloud DMOs

  • Static SOQL can now be used with Data Cloud data model objects (DMOs), making it easier to work with Data Cloud DMOs in Apex. Previously, you had to write these queries dynamically and use the CdpQuery (see docs) in Apex.

Below is an example of SOQL working with a Data Cloud data model object Solar_Panel_Event__dlm.

Note: With static SOQL, you now receive the result as a strongly typed Data Cloud DMO. This eliminates the need to write additional code for typecasting the response, which was previously required when using the CdpQuery class.

  • SOQL using Apex Database.QueryLocator or in FOR loops is also supported in the API version 61.0 and later, providing more flexibility in query execution.
  • Batch Apex can be executed against DMOs using Iterable. However, QueryLocators are not yet supported in Batch Apex.
  • When using SOQL with Data Cloud domain model objects (DMOs) in combination with Apex features like WITH USER_MODE, it’s crucial to understand how the security model is enforced. The release notes provide detailed guidance on this.

Mocking SOQL queries for DMOs

  • We also have now introduced the ability to mock SOQL query responses for Data Cloud data model objects (DMOs) in Apex for unit testing. A new SoqlStubProvider class has been introduced, which you can extend and then override the handleSoqlQuery() method to provide mock responses.

For example, lets assume we are writing a test class for a class that has a SOQL against DMO covered in the “Static SOQL for Data Cloud DMOs” section above. Below is an example test class using the SoqlStubProvider class.

Run tests for Data Cloud-triggered flows

  • Data Cloud-triggered flows can now be tested (see docs). With tests, you can quickly verify that your flow is behaving as intended without having to manually configure debug parameters for each debug run.

Look up data from DMOs for your org

  • You can now create a lookup relationship between any DMO and a limited number of CRM objects in your org, so that you can query from Apex or create a related list for Data Cloud data.
  • This new feature simplifies the process of building data models that support large data volumes. With Data Cloud, you can effectively manage engagement data that scales up to billions of records, seamlessly integrating it with your core CRM objects. This capability ensures that your customer engagement efforts remain efficient and personalized, even as your data volumes grow exponentially.

Data Cloud enrichment with Salesforce CRM objects

  • Data Cloud Related List Enrichments now offer support for Account objects (see docs).
  • You can create and access copy field enrichments for more objects from Setup (see docs). Previously only Leads and Contacts were supported.

Query data graphs for metadata and data using the Data Graphs APIs

  • You can now access the data graph metadata and data through REST APIs (see docs), enabling seamless integration with other systems and applications.
  • A data graph combines and transforms data from different sources (data model objects) into new, unified views. These new views provide a consolidated and materialized representation of your data. Salesforce Data Cloud allows you to create these data graphs effortlessly.

2GP packaging support for Data Cloud apps

  • You can now package Data Cloud metadata types listed in the documentation with second-generation packaged (2GP) managed packages. Note that 2GP-managed packages for Data Cloud should consist of only metadata types related to Data Cloud.

Data Cloud makes industry Clouds better

  • If you work with Salesforce industry solutions, there are a bunch of features added to every industry-specific Cloud. Be sure to check them out (see docs).

Einstein 1 Studio

Einstein Copilot is now Generally Available

Einstein Copilot provides conversational AI capability for your Salesforce app.

Prompt Builder

  • You no longer need to manually specify the grounding resource in your prompt. Introducing Record Snapshot, a new resource type in Prompt Builder. With Record Snapshot, your prompts are automatically grounded with data available on the user’s page layout.

Einstein 1 Studio (includes Prompt Builder, Copilot Builder, and Model Builder) and Data Cloud receive monthly feature updates. We will update this section and also document newly added features in the monthly release section of the release notes.

Development environments

Scratch Org Snapshots are now generally available.

  • The Scratch Org Snapshots feature lets you quickly replicate scratch orgs with required project dependencies. Manually configuring scratch orgs with packages, metadata, data, and other configurations can be time-consuming. With snapshots, you save a scratch org’s configuration and then use it to create identically-configured orgs much faster. This makes development and testing easier. See the documentation to learn more.
  • New features since the Beta release include:
    • Support for Salesforce Platform and Limited Access user licenses
    • Extended snapshot expiration period to 90 days
    • Ability to change the snapshot’s language

Data Mask is available in GA

  • Data Mask enables admins and developers to mask sensitive data in sandboxes, such as Personally Identifiable Information (PII) or sales revenue.

Platform development tools

The Salesforce CLI receives updates every week. Check the Salesforce CLI release notes weekly for helpful updates. Recent major improvements include:

  • Salesforce CLI downloads, installations, and updates just got a whole lot faster, especially on Windows. We’ve significantly reduced the size of both the npm packages and the OS-specific installers.
  • You can now specify to Salesforce CLI to decompose four more metadata types (Permission Set, Custom Labels, Sharing Rules, and Workflows) when it converts from mdapi to source format, in addition to the types it currently decomposes automatically (CustomObject and CustomObjectTranslation). This feature is in Beta.
  • Specify the flag values for Salesforce CLI commands in local text files by using the --flags-dir <dir-name> flag when running the command.
  • (Beta) Import and export test data more easily with the improved data import|export tree commands.
  • Easily refresh a sandbox from the command line with the new org refresh sandbox CLI command.

Packaging enhancements

  • Iterate creating unlocked and 2GP packages quickly with new Async validation. With Async validation, the packages will be created without validation. To create a package with async validation, you can use the CLI command sf package version create –-async-validation <rest of command syntax>.
  • Skip the FeatureEnforcement handler (see docs) during package installation in scratch orgs to accelerate the process. This handler validates objects and features, but it isn’t critical for temporary scratch org environments used for development and testing. Skipping it significantly reduces installation time, streamlining your development workflows. To skip feature enforcement during package installation, use the command sf package install --skip-handlers FeatureEnforcement <rest of command syntax>.
  • External client apps, a new generation of connected apps, can now be packaged in 2GP-managed packages.
  • Documentation improvements clarify which components can be packaged in 2GP (second-generation managed packages) or 1GP (first-generation managed packages). For ISVs, these guides specify packageable metadata types:

APIs & integrations

  • You can now update a record using the value of its external ID with the new updateOnly parameter in REST API. Previously, you could only upsert a record using its external ID.
  • Ensure uninterrupted service by updating the URLs in your API calls to use your My Domain login URL. This proactive step will prevent any potential service disruptions. For detailed guidance, please refer to the documentation.
  • You can better manage event subscriptions with the Pub/Sub API (Beta). Use the configuration options via the new ManagedEventSubscription tooling objects to automatically track the events that a subscriber client consumed, and to resume a subscription from where it left off after a client disconnects.
  • You can now access more external data types with the custom adapter for Salesforce Connect.
  • The external client apps framework, a new and improved generation of connected apps, is rapidly gaining ground. This innovative framework now offers several powerful features, including Headless Login, Passwordless Login, Guest User Flows, and JSON Web Token (JWT) Access Tokens.
  • The new External Client App Manager allows you to create, manage, and update your external client apps from the Salesforce UI, in addition to using metadata APIs.

More Summer ’24 learning resources

About the authors

Mohith Shrivastava is a Principal Developer Advocate at Salesforce with a decade of experience building enterprise-scale products on the Salesforce Platform. Mohith is currently among the lead contributors on Salesforce Stack Exchange, a developer forum where Salesforce Developers can ask questions and share knowledge. You can follow him on LinkedIn.

Kaitlin Benz is a Marketing Communications Lead at Salesforce. She’s most passionate about storytelling, podcasts, and vegan food. Find her on LinkedIn.

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS