The Winter ’22 Salesforce Releases feature a plethora of features across each of Salesforce’s products. Today, I’ll share some of my favorite development features coming along with the Winter ’22 Release.
There are many updates coming with Lightning Components in this release. Lightning Web Security is a new beta client-side architecture that helps mitigate more UI attacks. As part of Dynamic actions, you can now define Lightning web component events on a page and expose them in Lightning App Builder. Use the dependencies tree viewer to see which custom components and Apex classes a Lightning web component uses quickly and easily. The new lightning/userConsentCookie module allows you to incorporate user-authorized cookie consent into components, using one or more of the Required, Marketing, Preference, and Statistics types. A new feature allows error messages to be read by screen readers by setting an ID for the error element. A new pilot program allows you to configure flows with fewer screens.
There are also some other changes you should be aware of for this release. A limit of 2,500 actions in a boxcar request was instantiated, causing an HTTP 413 error if this limit is reached. Additionally, UI tests may need to be adapted as Lightning Experience is updated to meet current web standards – you can visit the release notes to learn more about how tests should be adapted to avoid these errors.
Additionally, there are some release updates being enforced, as well as new and existing release updates. With Aura components, it will now enforce external components with “access=public” being accessible to only other components with the same namespace or internal Salesforce components. Also enforced is the scope of an OAuth token, defined in a connected app to prevent unintended use of them. The final update being enforced is the CORS allowlist for Lightning Apps. As for the rest of the release updates, the Prevent Consecutive API Navigation Calls, which was originally only available for Visualforce pages, is now available for Lightning Components. Finally, you should know to refrain from enabling Secure Static Resources for Lightning Components as this release update has been postponed indefinitely.
Einstein Vision and Language
The Winter ’22 Release features some updates to Einstein Vision and Language. With Einstein Vision, you can now detect text from multiple tables on a page, whereas originally this was only possible with one table. You’ll also now be able to detect text in PDFs using Einstein OCR. Finally, the new object-detection-v2 algorithm reduces the minimum number of bounding boxes of annotation per object required to train a dataset from 200 to 50 – although object-detection-v1 is still supported.
With Einstein Language, Einstein NER (in beta) recognizes credit card numbers from eight issuers as well as Social Security Numbers, and supports different number formats including delimiters (or the lack thereof). Also, when creating new intent datasets, you now only need a minimum 20 examples instead of 50.
There are also several Apex enhancements with this release. You can now use the valueOf() enum method to convert a specified string to an enum constant value, which in previous releases resulted in a runtime error. You can also now use mock testing for Salesforce functions using the Test.setMock() with the new FunctionInvokeMock interface and the MockFunctionInvocationFactory class methods. Finally, a new Developer Preview (only available in Sandbox mode) features Invokable.Action, a new class that allows you to call invokable actions from Apex code.
There are several things to be aware of with API updates. Salesforce Platform API versions 7.0 through 20.0 have been deprecated. Additionally, Salesforce Platform API versions 21.0 through 30.0 will be deprecated with the Summer ’22 release. Another note involves the Tooling API; in versions 53.0 and later, the referenceTo() values of a Field object describeSObjects() response now includes the correct API names.
Next are the packaging updates. Now in beta, you can remove metadata components that you no longer want in second-generation managed packages, the list of removable components expanded. In developer preview this release is featuring more capabilities to convert first-generation managed packages to second-generation managed packages and install it in a scratch org.
You can now simplify package development with this release by creating an org shape for your org and specifying the source org’s ID in your scratch org definition file. You can also sort and filter your list of packages in Setup, as well as view progress on Package Uninstalls. And to prevent translation issues, these characters are no longer accepted from translation text in managed packages:
^, _, `, |, and ~.
Platform Developer Tools
The Winter ’22 release includes the Salesforce DX toolset, which includes Salesforce Extension for Visual Studio Code and Salesforce CLI. You can find more information about what’s available in the weekly release notes.
Lightning Design System
The Lightning Design System features some enhancements. For accessibility, input was replaced with button in components featuring select-only comboboxes. Finally, several updates come to SLDS component blueprints, which can be found in the release notes.
Now generally available with the Winter ’22 release are Salesforce Functions, which opens up development to include additional programming languages as well as open-source and third-party frameworks. This will allow developers to use languages and development tools of their choice that communicate with their org and are invokable with Apex methods to increase productivity and create more scalable efficient applications. Salesforce Functions are fully managed by the Salesforce Platform. For more information, be sure to check the Salesforce Functions Documentation Center.
Next up, we’ll be looking at updates with the AppExchange. Using AppAnayltics, you can now receive insights on how subscribers are using your managed packages using TableauCRM data. App Analytics also now includes subscriber
organization_status fields. User Metrics is being retired, and users can access historical data from User Metrics through the Winter ’22 release. Finally, you can use the AppExchange App Analytics Cookbook to build Tableau CRM recipes to integrate License Management App and AppExchange App Analytics Data. You can also build recipes for Tableau CRM dashboards.
Change Data Capture
With the new release, you can install managed packages released from the AppExchange containing Change Data Capture entry selections without errors if you exceed the default allocation for the selected entries.
Channels is a pilot for the previous release that received some updates in the Winter ’22 release. With channels, you can receive messages that only meet a certain criteria with predefined filters. This update to the pilot includes additional field type and operations support, although note that text fields are now case-sensitive and must be enclosed with single quotes.
New and Changed Items for Developers
Finally, let’s go over some new and changed items for developers in this release. Starting off with Lightning Components, we have changes to the following web components. Details on these changes can be found in the release notes.
- lightning-accordion-section (changed)
- lightning-button (new)
- lightning-helptext (changed)
- lightning-input-field (changed)
- lightning-output-field (changed)
- lightning-tree-grid (new)
There are also some changes to modules within Lightning Web Components, with details in the release notes. To summarize, the lightning/userConsentCookie is now available, including two exported functions that incorporate user-authorized cookie consent into components for Experience Cloud. Additionally, the lightning/analyticsWaveApi (Beta) includes new wire adapters and methods for implementing Tableau CRM connectors and connected objects.
There were also changes to Aura Components; the details can be found in the release notes. Below are the components that changed:
Looking at Apex, there are a few changes to classes, enums, and interfaces. Within the Cache namespace, the new Cache.CacheBuilderExecutionException can be used when the execution of the cache builder fails. Additionally, the Cache.InvalidParamException now includes extended checks for incorrect formatting of the key parameter.
In the Functions namespace, the new MockFunctionInvocationFactory class, as well as the FunctionInvokeMock interface, were introduced for testing of Salesforce Functions.
The LxScheduler namespace has two new methods in existing classes. The new setCorrelationId(correlationId) method in the lxscheduler.GetAppointmentCandidatesInputBuilder and lxscheduler.GetAppointmentSlotsInputBuilder classes track requests from external systems taking the correlation ID. You can also now limit the number of service resources that can show during appointment scheduling when appointment distribution is enabled using the setResourceLimitApptDistribution(resourceLimitAppDistribution) method, found in the lxscheduler.GetAppointmentCandidatesInputBuilder class.
The System namespace includes the new hasPackageLicense(packageId) method to verify if the context user has package access throughout the assignment of a managed package license.
Finally, the Invocable namespace, now in developer preview, has been introduced for calling invocable actions and introduces a plethora of classes and methods to do so.
Next up is the ConnectApi, which has several additions and changes. There are several additions and changes to Connect in Apex classes, as well as new methods for the Experience Cloud Microsites Pilot, all of which can be found in this section of the release notes. You can also check out the changes here for Apex Input Classes and Apex Output Classes, and Apex Enums.
Finally, there are several New and Changed items to the API in version 53.0; the full list can be found in this section of the release notes. This includes changes to Objects, Platform Events, the REST and SOAP APIs, the Reports and Dashboards REST API, Connect REST API, Tableau CRM REST API, the User Interface API, and the Metadata and Tooling APIs.
I hope this overview of all of the Development features coming with the Winter ’22 release was helpful! For a full description of what’s coming to the Winter ’22 Release, check out the Release Notes from Salesforce. And if you have any questions, feel free to reach out! We’re an Austin-based Salesforce Consulting partner, with a passion and belief that the Salesforce platform’s capabilities can help businesses run more efficiently and effectively. Thanks for stopping by the Roycon Salesforce blog, be sure to subscribe. If you need help, or just feel like talking Salesforce you can always contact us. Thanks for reading and as always, happy building!
Julie Anna Contino
Julie Anna is a junior developer with a passion for learning and problem-solving. She graduated with a Bachelor's degree in Computer Science and has four years of development experience. She's excited to be a part of the Salesforce ecosystem and combine her previous experience with her passion for helping clients thrive.