Winter'21 Release Notes

Published in Release Notes

The Sandbox Preview window for Winter ‘21 begins on September 11, 2020. If you would like your sandbox to take part, it must be active on a preview instance before then.

1. Use the Safe Navigation Operator to Avoid Null Pointer Exceptions

Use the safe navigation operator (?.) to replace explicit, sequential checks for null references. This new operator short-circuits expressions that attempt to operate on a null value and returns null instead of throwing a NullPointerException.

Account a = null;
System.debug(a?.Name); // null

Account b = new Account(Name = 'Buster');
System.debug(b?.Name); // 'Buster'

2. Improve Apex Testing with New SObject Error Methods

Track errors with the new SObject.hasErrors() and SObject.getErrors() methods without performing a DML operation to check the result for errors. Dynamically add errors to specific fields with new SObject.addError() overload methods. Use the hasErrors() method to know if an SObject instance contains errors. Use the getErrors() method to retrieve the list of errors for a specific SObject instance.

Use the addError() overload methods in the System.SObject class to dynamically add errors to an SObject field
Know if an SObject instance contains errors
Get the error details for an SObject instance

3. Send Custom Notifications from Apex

Use the Messaging.CustomNotification class to create, configure, and send custom notifications directly from Apex code, such as a trigger.

4. Detect Apex Runtime Context with RequestId and Quiddity

You can now detect Apex context at runtime and correlate multiple logs triggered by the request, using Request ID and Quiddity values. Use the methods in the System.Request class to obtain the Request ID and Quiddity of the current Salesforce request.

// Get info about the current request
Request reqInfo = Request.getCurrent();

// Universally unique identifier for this request
// Same as requestId in splunk or REQUEST_ID in event monitoring
String currentRequestId = reqInfo.getRequestId();

// enum representing how Apex is running. e.g. BULK_API vs LIGHTNING
// Use this with a switch statement,
// instead of checking System.isFuture() || System.isQueueable() || ...
Quiddity currentType = reqInfo.getQuiddity();

5. Scan a Barcode in a Lightning Web Component (Beta)

Use the BarcodeScanner API to add barcode scanning to your Lightning web components. Scan UPC, QR, and other standard barcode types from Lightning components running on a mobile device. Look up product details, record inventory scans, save contact details from a conference badge—your code, your way!

6. Trigger a Flow to Run Before a Record is Deleted

In Flow Builder, you can now configure a new record–triggered flow to run before a record is deleted. You no longer need to write Apex code to set this up. This autolaunched flow runs in the background and updates related records when a record is deleted.

7. Debug Flow Errors in Sandbox Org as Another User

Debugging a flow in a sandbox org is now easier than ever with the ability to debug a flow as another user. When you debug a flow as another user, you can catch flow exceptions such as unexpected permission, sharing, and profile configurations before they occur in production orgs.

8. Interactively Create Engaging Email Templates

Create email templates faster and more easily with visual tools in Email Template Builder. Instead of adding HTML code, your users can drag elements to create effective email templates. They can compose email templates with a few clicks to place design elements right where they want them.

9. Break Up Your Record Details with Dynamic Forms (Generally Available)

Dynamic Forms is the next step in the evolution of Lightning record pages. It adds the ability to configure record detail fields and sections inside the Lightning App Builder. This feature, which is now generally available and enabled for everyone, includes some changes since the beta release.

10. Analyze Your Lightning Page Performance

Discover ways to make your record page perform better based on analysis right inside the Lightning App Builder. Performance Analysis in App Builder evaluates the fields, instances of the Related Lists component, and metadata of a record page. With the click of a button, get best practices and suggestions for improving page performance and the end-user experience.

11. Find Changed Deals at a Glance

Opportunity deal change highlights help your sales team prioritize work by showing recent changes to amounts and close dates. For example, knowing which deals changed helps sales managers with their weekly coaching sessions. In the opportunities list view and Kanban view, text colors and arrows indicate amounts and close dates that changed during the last 7 days. And users can hover over an arrow to get details.

12. Auto Add Fields to Custom Report Types (Beta)

It’s time-consuming to add new custom fields to your reports, especially when you have many custom report types. Now with Auto Add, custom fields that you add to a Salesforce object are added automatically to all the custom report types based on that object. When you create a report from the custom report type, all the custom fields are right there for you to add to your report.

Beta feature

Close

As a beta feature, Report Subscription Attachments is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for Report Subscription Attachments in the IdeaExchange or in the Trailblazer Community. For information on enabling this feature in your org, contact Salesforce.

Keep this in mind as action on

Changed Limits



Useful links:

Comments powered by CComment