Salesforce Winter '21 Release Highlights/Overview

Track Chat Conversations with a New Message Icon
Provide a modern experience for your Embedded Chat users with a sleek new message notification and arrow. The icon, showing the number of unread messages, appears in the chat window above those messages. The user can scroll down to read and know when an agent is typing.


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.

This example first evaluates a, and returns null if a is null. Otherwise, the return value is a.b.
a?.b // Evaluates to: a == null? Null : a.b

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.

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.

No comments:

Post a Comment