The Salesforce Winter '21 release is just around the corner. The release dates are set for September 19, October 9, and October 16-17, but you should check Trust to learn when your Salesforce instance will get the updates.
The CRM Science team has seen quite a few features in the Salesforce Winter ‘21 release that we are excited to start using. Many of the new features solve day-to-day puzzles I have experienced as a Salesforce developer and consultant when meeting the needs of CRM Science consulting clients.
Here are six Salesforce Winter ‘21 release features Salesforce developers will want to know about:
1. Safe Navigation Operator
Every Salesforce developer working with Apex will at some point have to:
Perform a SOQL query that should only return a single record.
Attempt to access a multi-level relationship field (e.g. : contact.Account.Name).
Perform a built-in operation on a string (such as returning the string in lowercase).
All of these operations have the potential to produce a null pointer exception in Apex.
Before Winter '21, we had to add additional lines of code that specifically dealt with preventing this type of error.
The safe navigation operator provides the same checks in a more condensed, readable format:
Using the safe navigation operator takes an expression that would normally throw a null pointer exception and returns null instead.
This is an easy time-saver, and I have a feeling a lot of developers will want to utilize the safe navigation operator as soon as it's available.
2. Record-Triggered Flows Now Run on Delete
Record-triggered flows are a great way to build automated processes that run when a record changes. Until Winter '21, however, we could not write a record-triggered flow for a delete operation.
Running record-triggered flows on delete will prevent the need to write Apex triggers for just the delete case. Using this new feature is a great way to follow Salesforce low-code best practices and, of course, save precious time.
3. Salesforce Lightning Design System (SLDS) Styling Hooks
Base lightning components offer a great deal of simplicity, but they have limited customizability. Lightning Design System Styling Hooks provide developers with another tool for changing the look and feel of base components.
For example, you can use SLDS Styling Hooks to create base components using company branding conventions. Here’s how we can make a lightning button have an orange background.
If we add the following CSS:
Our button is now orange:
4. New Change Set Component: Custom Index
The Custom Index Change Set Component is a huge time saver!
As more records are added to an org and it becomes high volume, the potential for encountering errors from non-selective queries increases. As an org grows, SOQL queries that would previously run without issue may start producing errors due to selectivity requirements.
One solution is to build a custom index on a field used for filtering. A custom index can improve performance, but it often requires Salesforce to activate the index through logging a case.
With the ability to add custom indices to change sets, we can deploy a custom index between two environments without having to contact Salesforce to enable this feature.
5. Use the PATCH HTTP Method in Apex Callouts
Recently, one of our developers needed to interface with an API that used an http PATCH endpoint. At the time, Apex did not support callouts to PATCH endpoints. Now in Winter '21, PATCH callouts are supported, which makes callouts to external APIs that use these methods possible.
You can make partial or full updates to a resource in an HTTP web service by specifying the PATCH method in the HttpRequest class.
6. Lightning Web Component (LWC) Module Update for Refreshing Data
One of my colleagues at CRM Science shared this Winter ‘21 release feature in our Tech Talk chat, and it got our team excited because it will make things a little easier for us.
With this update comes a new function - getRecordNotifyChange().
According to Winter ‘21 release documentation, “Call getRecordNotifyChange() to refresh the Lightning Data Service cache after you update a record outside of its mechanisms, such as via imperative Apex, Visualforce, or when you call User Interface API via a third-party framework.”
Implementing Salesforce Winter ‘21 Release Features
Every one of these features solves an issue that the CRM Science team has faced when working on the platform. It's reassuring to know that highly requested features are consistently added each release. All of these new features and more are now available in Winter '21 sandboxes.
You can sign up for access to a Winter '21 pre-release org and try these features today! Also, be sure to join the Release Readiness Trailblazer Community Group to connect with other Salesforce professionals and get the most out of these new features.
Read our admin-focused counterpart blog, Salesforce Winter '21 Release Features for Admins.
Contact CRM Science Salesforce Consultants
Our team of Salesforce consultants loves sifting through Salesforce release documentation to find enhancements to the platform that will make their jobs easier and keep CRM Science clients satisfied. Contact us with any questions about the Winter ‘21 release or chat about your Salesforce puzzles.