Salesforce Spring ’24 Release Notes are here. It means a perfect gift for long weekend and holidays. So today we will cover some of the points related to Spring ’24 Release.
Salesforce Spring ’24 Release Notes Points Related to Salesforce Admin
MFA Is Turned On by Default Starting April 2024
Salesforce is making MFA a default part of the direct login process for production orgs. This change applies to production orgs created on or after April 8, 2024. It also applies to any existing production org that wasn’t included in one of the MFA auto-enablement phases that occurred between Spring ’23 and Spring ’24. Sandbox orgs aren’t affected.
Transfer Lightning Dashboard Ownership (Generally Available)
We can change the ownership of multiple dashboards at one time and can send an email notification to the new owner. Previously, we had to clone or re-create the dashboard to provide access to a new owner.
Supercharge Your Visualizations with Images, Rich Text, and Dashboard Widgets in All Salesforce Editions
Salesforce users in all editions can now use rich text and image widgets in Lightning dashboards. Explain charts, describe metrics and KPIs, and clarify tables with rich text right where users need it. Add company logos and branding, flow diagrams, and embedded images. Guide users through their data with section titles, narrative text, and even animated GIFs. Lightning dashboard components are now called widgets in all editions. Dashboards now support up to 25 widgets, including a maximum of 20 charts and tables, 2 images, and 25 rich text widgets. The former limit was 20 in total.
Rearrange Multiple Lightning Report Columns at Once
Now we can move multiple columns in the Lightning report builder at the same time. Previously, this feature was available only in Salesforce Classic.
Add Fields from Related Objects to Dynamic Forms-Enabled Pages
We can now display relevant data from related objects, drag the cross-object fields onto record page. On the Fields tab, a breadcrumb at the top shows the spans that you drilled into. The top-level breadcrumb indicates the object that the page is associated with. Cross-object relationship fields have an arrow icon (>). You can drag them onto the page as is, or click the arrow icon to drill in.
Use Dynamic Actions with Standard Objects on Mobile
We can now use dynamic actions for standard objects on mobile devices. Assign actions in the Lightning App Builder instead of the page layout, and apply filters to control when and where actions appear for users.
Salesforce Spring ’24 Release Notes Points Related to Salesforce Developer
Ant Migration Tool End of Life
The Ant Migration Tool is retired with Spring ’24. The tool continues to function for future API versions but isn’t updated with new functionality and isn’t supported. To manage metadata changes, switch to Salesforce CLI for a modern, supported developer experience.
Search for Records with the Lightning Record Picker Component (Generally Available)
Use the lightning-record-picker
component to search the record in Desktop or mobile. It can retrieve up to 100 records. It also displays clear error messages when you configure invalid specifications and supports new attributes. This component uses the GraphQL wire adapter, which enables offline use.
<lightning-record-picker
label="Select a record"
placeholder="Search..."
object-api-name="Contact"
value={initialValue}
onchange={handleChange}
></lightning-record-picker>
Monitor Component Events with Custom Component Instrumentation API (Generally Available)
We can add observability to our Lightning web components with Custom Component Instrumentation API. Custom Component Instrumentation API, now generally available, includes a change since the beta release. Now we can view custom component logs on the browser console. Custom Component Instrumentation API is designed for Lightning web components and isn’t supported for Aura components.
From Setup, in the Quick Find box, enter event, and then select Event Monitoring Settings. Turn on Lightning Logger Events.
Next, import log
from the lightning/logger
module in your component and log data messages to Event Monitoring. The log()
function publishes data to a new EventLog File event type called Lightning Logger Event that structures the event data for use in Event Monitoring.
<!-- myComponent.html -->
<template>
<lightning-button label="Approve"
onclick={handleClick}>
</lightning-button>
</template>
// myComponent.js
import { LightningElement } from 'lwc';
import { log } from 'lightning/logger';
export default class HelloWorld extends LightningElement {
constructor() {
super();
}
let msg = {
type: "click",
action: "Approve"
}
handleClick() {
log(msg);
}
}
Use the Null Coalescing Operator
We can use the ?? operator, it return the left hand side value if its not null. Otherwise, it returns the right-hand argument. It remove the need of explicit checks for null references in code.
Integer notNullReturnValue = anInteger ?? 100;
Make Callouts After Rolling Back DML and Releasing Savepoints
Roll back all uncommitted DML by using a savepoint. Then use the new Database.releaseSavepoint
method to explicitly release savepoints before making a desired callout. Previously, callouts after creating savepoints resulted in a CalloutException
regardless of whether there was uncommitted DML or the changes were rolled back to a savepoint.
Savepoint sp = Database.setSavepoint();
try {
// Try a database operation
insert new Account(name='Foo');
integer bang = 1 / 0;
} catch (Exception ex) {
Database.rollback(sp);
Database.releaseSavepoint(sp); // Also releases any savepoints created after 'sp'
makeACallout(); // Callout is allowed because uncommitted work is rolled back and savepoints are released
}
Compress and Extract Zip Files in Apex (Developer Preview)
I believe this is very big update. Use the methods in the new Compression
namespace to easily generate and extract compressed zip files. We can also specify the data to extract from the zip archive without uncompressing the entire zip archive.
We can add zip entries by specifying details, such as an entry name, comment, and compression method, use the addEntry(String name, Blob data)
, addEntry(compression.ZipEntry prototype)
, and setMethod(compression.Method method)
methods in the ZipWriter
class. To generate a zipped archive and return the result as an Apex blob, use the getArchive()
method. This code sample compresses email attachments into a single file.
ZipWriter writer = new ZipWriter();
List<id> contentDocumentIds = new List<id>();
// Add IDs of documents to be compressed to contentDocumentIds
for ( ContentVersion cv : [SELECT PathOnClient, Versiondata
FROM ContentVersion
WHERE ContentDocumentId IN :contentDocumentIds])
{
writer.addEntry(cv.PathOnClient, cv.versiondata);
}
blob zipAttachment = writer.getArchive();
Messaging.EmailFileAttachment efa1 = new Messaging.EmailFileAttachment();
efa.setFileName('attachments.zip');
efa.setBody(zipAttachment);
fileAttachments.add(efa);
So these are the some points which I like most in Salesforce Spring ’24 Release Notes. As always we will cover Salesforce Flow in a separate post. You can signup for pre-release org here. So which point you liked the most in Spring 24 release, let me know in comments. Happy Programming 🙂