Salesforce Spring ’21 Release Highlights

Salesforce Spring ’21 Release Highlights

SOQL
The new FIELDS() function lets you select all the fields without knowing their names in advance. 
Use FIELDS(ALL), FIELDS(STANDARD), or FIELDS(CUSTOM) in the SELECT statements. 

Retirement of Platform API Legacy Versions
The following API versions will be retired and will no longer be supported by Salesforce:

1. SOAP API
7.0, 8.0, 9.0, 10.0, 11.0, 11.1, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0
2. REST API
20.0
3. Bulk API
16.0, 17.0, 18.0, 19.0, 20.0

Sharing Button in Salesforce Lightning
No need to switch to Classic for using the Sharing button.

Flag Invocable Apex Methods That Make Callouts
For invocable actions that perform callouts, you can now add a callout attribute to the invocable Apex method annotation. With this information, a flow calling the action knows how to manage the transaction at run time.

Syntax:
@InvocableMethod(callout=true, label=”My Action Label”)

If your action makes a callout, set the callout attribute to true. If the action is executed by a flow, at run time the flow determines how to successfully execute the action, in a new transaction or in the currently running transaction. If the callout attribute is set to false, the action is flagged to safely perform in the transaction regardless of whether the transaction has uncommitted work.

Refer to the Prior Values of the Record That Triggered Your Flow

Now when a record is updated, you can access that record’s prior values in Salesforce Flow. The $Record__Prior global variable contains the record’s values immediately before the flow was run. Use these prior values to check for changes and calculate differences in your flow.
 
 

Configure the User and Batch Size for Your Platform Event Trigger

You can override the default running user and batch size of a platform event Apex trigger. By default, the trigger runs as the Automated Process system user with a batch size of 2,000 event messages. Configuring the user and batch size enables you to bypass some limitations that sometimes arise from using the defaults. For example, record system and OwnerId fields are populated as the specified user. And setting a batch size smaller than 2,000 can help avoid hitting Apex governor limits.

Obtain a map containing all custom metadata records or a single record sObject for a custom metadata type
Use the new Apex getAll(), getInstance(recordId), getInstance(qualifiedApiName), or getInstance(developerName) methods to retrieve custom metadata type records.
This definitely avoids a SOQL.
Sample Code:
System.debug( Test__mdt.getAll() );
System.debug( Test__mdt.getInstance( ‘Account’ ) );
View All, Modify All, Edit, and Delete Object Permissions Removed for Guest Users
Salesforce is removing the View All, Modify All, edit, and delete object permissions on all objects for guest users in new and existing orgs. These permissions are removed for custom objects and standard objects. Guest users can only have read and create object permissions.
Set Preferences for Allowed Cookies for Experience Builder Sites
A new setting in Experience Builder lets you decide what types of cookies are allowed on your site by default. 
Ant Migration Tool Requires Java Version 11 or Later
The Sping ’21 Ant Migration Tool (version 51.0) and later requires Java version 11 or later. Earlier Ant Migration Tool versions continue to support Java version 7 or later.
Create a Lightning Web Component Action (Pilot)
Create a Lightning web component (LWC) and use it as a quick action. Lightning web component actions work side by side on your pages along with Lightning component and Visualforce actions. LWC actions offer advantages such as the ability to easily customize headers and footers, and to create actions that have no UI representation.
Add Zoom Meeting Links to Events Created Using Insert Availability
Sales reps can now connect their Zoom accounts and automatically add Zoom meeting links to invitations created using the Insert Availability feature in Lightning Experience email. Automated Zoom meeting link additions means reps no longer add links manually after attendees select an event time.

Leave a Reply