Salesforce Winter '21 Release - App Builder & Development Top Features
Winter '21 release is round the corner. Below is my top pick from App Builder & Development perspective: -
Trigger a Flow to Run Before a Record Is Deleted
In Flow Builder, we 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 auto launched flow runs in the background and updates related records when a record is deleted. This feature is HUGE one.
Why: For example, suppose that your Salesforce org has a custom field on the Account object that tracks the total items related to that account. Without automation, this field is updated manually every time a related item is deleted. Now, you can automate this task with a record-triggered flow that runs before a record is deleted.
The flow runs anytime an item is deleted. It finds the related account, and decrements the total number of items. When the flow finishes, the item that launched the flow is deleted.
How: When creating a flow, select Record-Triggered Flow.
To configure the flow to run before a record is deleted, click Edit on the Start element.
Select A record is deleted and you’re ready to build the flow.
The flow can access any record and perform actions before the record that launched the flow is deleted from the database. The $Record global variable contains the Salesforce record that launches the flow.
Considerations for record-triggered flows:
- Launching a flow after restoring a record via the undelete operation is not supported.
- Displaying custom error messages via the addError() method is not supported in invocable actions.
Create Flow Screen Components That Work for Multiple Objects (Generally Available)
Now developers can create reusable screen components that use the generic sObject and sObject[] data types. They can build one component that works for multiple objects, rather than one component for each individual object. For example, they can build a data table component that works with any collection of records, from accounts and contacts to custom objects.
Where: This change applies to Lightning web components in Lightning Experience in Enterprise, Performance, Unlimited, and Developer editions.
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.
Where: This change applies to Lightning Experience in Group, Professional, Enterprise, Performance, Unlimited, and Developer editions.
Why: The more fields on your page layout, the more that the Record Detail component becomes a monolithic block of fields that you can’t customize. With Dynamic Forms, you can migrate the fields and sections from your page layout as individual components into the Lightning App Builder. Then, you can configure them just like the rest of the components on the page, and give users only the fields and sections that they need.
How: Dynamic Forms is now enabled for everyone! As a result, you see new features available in the Lightning App Builder. A new Fields tab in the component palette contains Field and Field Section components, which are the building blocks for Dynamic Forms. And as you configure fields and sections, you get help from in-app tips, created just for Dynamic Forms-driven pages.
How do you get started? Open an existing record page in the Lightning App Builder, then click Upgrade Now from the Record Detail properties pane to launch the Dynamic Forms migration wizard. With only a few clicks, the wizard adds fields and field sections to the page for you.
Gotcha: Dynamic Forms is supported on record pages for custom objects only.
Changes Since Beta:
- Dynamic Forms is now on for everyone in supported editions. The ability to turn it on and off for your org from the Record Page Settings node in Setup is removed.
- Universally required fields moved to their own section of the palette and have distinctive icons.
- Packaging is now supported for pages that contain Dynamic Forms components (Field, Field Section).
- Enhanced support for Dynamic Forms during edit, create, and clone.
- Several limitations and known issues are resolved.
New Change Set Components
The components available for change sets vary by edition. These components are now available for change sets.
Allow URL for Redirects
Represents a trusted URL outside of the Salesforce domain to which links can redirect users without showing a “leaving Salesforce†warning message.
Channel Menu Deployment
Represents the deployment of a channel menu (such as phone or web chat) to a Salesforce Community or Site.
Custom Index
Represents a custom index used to improve the performance of SOQL queries.
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!
Where: This feature is available in Lightning web components when they’re running in the Salesforce mobile app or Mobile Publisher. Why: Improvements to the BarcodeScanner API in this release include the following.
- Added resumeCapture() to allow continuous scanning of multiple barcodes.
- Increased control over the scanning user experience.
- Improved error handling and error responses.
How: Using BarcodeScanner in your Lightning web component is straightforward.
- Import BarcodeScanner into your component definition.
- Test to make sure BarcodeScanner is available before you call scanning lifecycle functions.
- Use the scanning lifecycle functions to start and stop scanning.
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.
Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.
How: If the left-hand-side of the chain expression evaluates to null, the right-hand-side is not evaluated. Use the safe navigation operator (?.) in method, variable, and property chaining. The part of the expression that is not evaluated can include variable references, method references, or array expressions.
// Previous code checking for nulls String profileUrl = null; if (user.getProfileUrl() != null) { profileUrl = user.getProfileUrl().toExternalForm(); }
// New code using the safe navigation operator String profileUrl = user.getProfileUrl()?.toExternalForm();
This is HUGE one.
Delete up to 50,000 Big Object Records in a Batch
The Database.deleteImmediate() method now supports batch deletes of up to 50,000 big object records at once. This new limit matches the total number of records you can retrieve with a SOQL query.
Complete release notes can be found here