10 Salesforce Spring '24 Release Features Every Developer Should Know

The Salesforce Spring release has brought in a wave of exciting updates for developers. From advancements in migration tools to nuanced adjustments in Lightning components, there have been several key changes in the latest Salesforce release.

At Concret.io, we have compiled a list of top developer updates featuring not only an overview of each but also practical examples and quick steps to enable some of these. Take advantage of this Salesforce Developer blog to seamlessly integrate these enhancements into your Salesforce development projects. 

In addition, our expert team is dedicated to providing comprehensive Salesforce development services that ensure your projects are executed with the highest level of efficiency and quality. By staying updated with the latest developer trends and tools, we help you optimize your Salesforce environment for maximum performance and innovation.


1. Updated Lightning Web Components
 

In the Spring ‘24 release, Salesforce updated several Lightning Web Components (LWCs), introducing new attributes and behaviors. Here are some of the main changes:

a) The lightning-datatable component now includes a new attribute called wrap-table-header, allowing the header text to wrap within column widths. 

<!-- New attribute: wrap-table-header -->
<lightning-datatable
    key-field="id"
    data={data}
    columns={columns}
    wrap-table-header={true}>
</lightning-datatable>

Above, the wrap-table-header attribute is set to true, allowing the header text to wrap within column widths.

b) The lightning-input component receives a new attribute called role, enabling the creation of accessible combo boxes. Check out the below example showcasing the creation of combo boxes:

<!-- New Modified attribute: role -->
<lightning-input
    type="text"
    role="combobox">
</lightning-input>

Besides these attribute changes, the accessibility behavior is also changed for several LWCs such as lightning-pill and lightning-pill-container, specifically regarding keyboard navigation and the activation of remove buttons.

2. Migrate to Flow Tool Now Supports Partial Migration for More Processes 

The Migrate to Flow tool now supports partial migration for most actions, except invocable actions, giving users the flexibility to migrate actions selectively. The tool's migration results identify actions that need additional configuration in Flow Builder for a thorough and successful migration.

Here are some quick steps to enable this functionality and carry out the migration:

a. Accessing the Migrate to Flow Tool: Go to Setup→Enter "Migrate to Flow" in the Quick Find box→Select ‘Migrate to Flow’.

b. Choosing the Process for Conversion: Choose the specific process you want to convert into a flow → Initiate the migration process → Select the migration criteria. The Migrateable column provides a clear indication of the partial migratability of each process.

c. Reviewing Migration Results —> Once migration is complete, click on "Needs Review → A list of actions requiring additional configuration in Flow Builder will be presented.

Salesforce migrate to flow after spring 24

Source: Salesforce.com

Salesforce migrate to flow in spring 24

Source: Salesforce.com

3. Modifications in Lightning:Navigation

Lightning:navigation, a key Aura Component received a new set of updates in the Spring 24 release. The key adjustment centers around the replace property in the navigate(pageReference, replace) method. 

When replace is set to false (the default), saving a new record returns the user to the previous record page. Conversely, if replace is set to true, the post-saving navigation differs, taking the user to the new record page.

Below is an example showcasing the use of lighting:navigation component and the replace property.

When replace is set to false:
// In Example 1, we create a page reference object for initiating the creation of a new contact record.
var pageReference = {
// Specifies the type of page reference, which is a standard record page.
type: 'standard__recordPage',
// Defines attributes including the object API name and action name for creating a new contact.
attributes: {
objectApiName: 'Contact',
actionName: 'new'
}
};
// Navigate using the page reference object with replace set to false.
// This triggers navigation without replacing the current page.
component.find("navigationService").navigate(pageReference, false);
// Upon saving a new contact via a pop-up modal, the user is directed back to the previous record page.
// For instance, if a new contact is created via a quick action on an account page, the user returns to the account page after saving.
When replace is set to true
// In Example 2, we create a similar page reference object for initiating the creation of a new contact record.
var pageReference = {
// Specifies the type of page reference, which is a standard record page.
type: 'standard__recordPage',
// Defines attributes including the object API name and action name for creating a new contact.
attributes: {
objectApiName: 'Contact',
actionName: 'new'
}
};
// Navigate using the page reference object with replace set to true.
// This triggers navigation while replacing the current page.
component.find("navigationService").navigate(pageReference, true);
// After saving a new contact via a pop-up modal, the navigation behavior differs.
// The user is redirected to the page of the newly created contact.
// For example, adding a new contact from an account page would direct the user to the newly created contact's page immediately after saving.

4. New and Changed Apex Items

In the Spring '24 release, several Apex items have been introduced or modified across different namespaces, bringing forth notable improvements and expanded capabilities. Do make use of these new apex updates to power up your projects:

    a) Auth Namespace

In Spring 24, Salesforce introduced apex new classes, methods, interfaces, enums, and exceptions including features for handling JWTs, token validation results, and OAuth token revocation. This enhancement boosts security and provides Salesforce users with advanced tools for managing OAuth tokens.

//Validate incoming token
Auth OAuth2TokenExchangeHandler.validateIncomingToken(
‘myapp’, 
Auth.IntegratingAppType.Web, 
‘xyzToken’,
Auth.OAuth2TokenExchangeType.AccessToken
);

b) IsvPartners Namespace

Salesforce introduces a new namespace for AppExchange App Analytics with methods like logCustomInteraction. This namespace empowers Salesforce users to gain deeper insights into user interactions with their AppExchange apps, aiding in informed decision-making.

// Logging custom interaction 
IsvPartners.AppAnalytics.logCustomInteraction('UserClickedButton');

    c) ConnectApi Namespace

In the ConnectApi namespace, used for Connect REST API actions in Apex, classes, methods, and enums have been updated. These changes will enable Salesforce users to seamlessly integrate and interact with the Connect REST API, enhancing collaboration and data-sharing capabilities.

// Connect REST API with method call
ConnectApi.ChatterFeeds.getFeedItemsFromFeed('me', ConnectApi.FeedType.News);

   d)System Namespace

The System namespace, a fundamental part of Salesforce, has seen new apex updates for classes, methods, interfaces, enums, and exceptions. These additions, including UUID generation, improved DML validation, explicit savepoint release, setup page hostname retrieval, and enhanced quiddity identification, will enhance the core functionality of Salesforce for users.

// UUID Generation
String uniqueId = System.UUID.randomUUID();

e) Compression Namespace (Developer Preview)

The Compression namespace, part of the Developer Preview, is used for generating and extracting compressed files. It includes classes for zip operations with features like compression level specification, providing Salesforce developers with tools for efficient file handling.

// Compress zip entries and get the compressed content
Blob compressedData = Compression.ZipWriter.getArchive('file1.txt', 'file2.txt');

f) FormulaEval Namespace (Developer Preview)

The FormulaEval namespace, also in Developer Preview, facilitates dynamic formula evaluation in Apex. With classes for building, validating, and executing formulas, it introduces methods and enums for specifying formula details and return types. This empowers Salesforce developers to handle complex formula logic dynamically.

// Building a formula
FormulaBuilder formulaBuilder = new FormulaBuilder().withFormula('A+ B').withReturnType(FormulaReturnType.Number);
// Evaluating the formula
FormulaInstance formulaInstance = formulaBuilder.build();
Decimal result = formulaInstance.evaluate();

5. Achieve Global Compatibility With ICU Locale Formats

In Spring ‘24, a new update lets you use International Components for Unicode (ICU) locale formats for dates, times, numbers, and currencies. Turning on the ICU locale formats feature will enable the powerful ICU library to format things like dates and numbers based on what users like in their area, thus ensuring a smooth and culturally fitting experience for users worldwide.

When you enable the ICU locale formats, the appearance and behavior related to dates, times, and currencies can change. For this reason, we recommend that you test in a sandbox before activating the new formats in production.

A) Enable the formats for testing

a) From Setup, in the Quick Find Box, enter Release Updates, and then select Release Updates.

b) For the Enable ICU Locale Formats release update, click Get Started.

c) In the “Understand and minimize the impact of these changes with our step-by-step guide” section, click Enable Test Run.

Source: Salesforce.com


d) After you click Enable Test Run, the same section includes the text, “This update is now enabled for testing.” Your org is using ICU formats.

B) Activate the ICU formats for the English (Canada) [en_CA] locale

a) In the Quick Find box, enter User Interface, and then select User Interface.

b) Select Enable ICU formats for en_CA locale, and save your changes.

6. Improved Security for Visualforce JavaScript Remoting API With JsonAccess Annotation Validation

The Visualforce Remoting API uses JavaScript to directly call methods in Apex controllers from Visualforce pages. By turning on the JSONAccess Annotation Validation feature, users can protect their Apex classes from unauthorized access, preventing sneaky attempts to mess with their data by stopping it from being moved between different areas.

7. Data Cloud-Triggered Flows with New Debug Tools

The Data Cloud-Triggered flow debug tool in Flow Builder now serves a dual purpose – testing flow behavior and troubleshooting potential issues. This tool is especially beneficial for its secure testing environment, enabling users to verify flow behavior without any unintended impact on real records.

Note: The Data Cloud-Triggered flow debug tool will be accessible to users across all editions of Salesforce. 

Quick steps to utilize this feature:

a) Navigate to Flow Builder —> Select the Data Cloud-Triggered flow you want to assess.

b) Within Flow Builder, access the “Debug” option → In debug mode, choose a specific Data Cloud record to test the flow against.

c) Run the debugger, and systematically step through the flow's behavior to identify and understand potential issues during execution.

8. Apex REST API Enhancement: Enforcing RFC 7230 Validation

Salesforce is set to enforce RFC 7230 validation for Apex RESTResponse headers this Spring 24. This update improves legacy behavior where Apex REST Response headers weren’t validated and enables automatic RFC 7230 validation. After the update, invalid characters such as / are no longer accepted.

By incorporating this header (using RestResponse.addHeader(name, value) method), your Apex REST API responses will align with RFC 7230, ensuring consistency, clarity, and seamless integration with other RESTful applications.

@RestResource(urlMapping='/exampleEndpoint/*')
global with sharing class ExampleRestController {
    // Retrieve Salesforce data with HTTP GET method
    @HttpGet
    global static String doGet() {
        // Assume you're retrieving some Salesforce data
        String responseData = '{"accountId": "001XXXXXXXXXXXXXXX", "name": "Sample Account"}';
        // Set the RFC 7230 header to enable the check for structured and named responses
        RestContext.response.addHeader('RFC-7230-Check', 'enabled');
        return responseData;
    }
}

Example: Check out the use of RestContext.response.addHeader('RFC-7230-Check', 'enabled');. This line adds the RFC 7230 header to the API response.

9. Apex REST API Defaults to JSON for HTTP ACCEPT Headers

The Apex REST API HTTP ACCEPT headers now default to JSON if you don’t specify the Accept header or if it is malformed. This is Salesforce’s attempt to bring consistency across Salesforce APIs, making handling content types in HTTP headers more straightforward.

Before this change (prior to API version 60.0):

// Requesting without specifying Accept header
GET /services/apexrest/yourEndpoint

Now, with the change (API version 60.0 and later):

// Requesting without specifying Accept header
GET /services/apexrest/yourEndpoint

10. Scratch Org Snapshots for Efficient Configuration (Beta Feature)

Salesforce has rolled out a Beta feature named "Scratch Org Snapshots," enabling users to take a snapshot of a scratch org's configuration at a specific moment. This feature simplifies the manual and time-consuming process of configuring scratch orgs with project dependencies. 

By enabling Scratch Org Snapshots in their Dev Hub org, users can utilize Salesforce CLI commands like org create snapshot and org list snapshot to manage and create snapshots efficiently, reducing the need for repetitive manual configurations.

Conclusion

In this Salesforce Developer Guide, we’ve included some of the key features and updates for developers. Try incorporating these to leverage the full potential of the latest Salesforce release enhancements.

Also, don’t forget to explore our latest Salesforce Developers Blog, filled with cutting-edge insights, new updates, and best practices to make your customer management experience better.

References

1. New and Changed Lightning Web Components

2. Migrate Even More Processes with the Updated Migrate to Flow Tool

3. New and Changed Aura Components

4. Apex: New and Changed Items

5. International Components for Unicode (ICU) Locale Format Changes in Winter ’23

6. Enable JsonAccess Annotation Validation for the Visualforce JavaScript Remoting API (Release Update)

7. Debug Data Cloud-Triggered Flows

8. Enforce RFC 7230 Validation for Apex RestResponse Headers (Release Update)

9. BEHAVIOR CHANGE: Apex REST API HTTP ACCEPT headers now default to JSON

10. Capture a Scratch Org’s Configuration with Scratch Org Snapshots (Beta)

Further Reading

1. Top 10 Apex Updates in Salesforce Spring 24 Release

2. Top 10 Salesforce Flow Builder Enhancements: Spring ‘24 Release Unveiled

3. Top 10 Admin Updates in Salesforce Spring ‘24 Release

Nitish Sharma

Nitish Sharma is a seasoned technical writer with over 5 years of experience in the IT industry. His expertise lies in Salesforce, AI, and Blockchain technologies. Nitish loves writing user-friendly documentation that simplifies complex technical concepts, making them accessible to both novice users and seasoned professionals.

Previous
Previous

15+ New Einstein Features in Salesforce Spring '24 Release

Next
Next

Top 10 Salesforce Flow Builder Enhancements: Spring ‘24 Release Unveiled