Developers

5 Things Salesforce Developers Can Get Excited for in 2022

By Todd Halfpenny

With 2022 now well underway and Salesforce’s Spring ‘22 release just around the corner, it’s a great time to discuss some of the things that Salesforce developers can look forward to in the year ahead. 

As with all of the Salesforce releases – which occur three times a year – the Spring ‘22 release contains several things for developers to get excited about. We’ll have a look at a few of these as well as a couple of other features that are not tied to this upcoming release but should be making themselves available this year.

1. Lightning Web Security

Salesforce’s Locker Service has provided a very important level of security to the web components served by our orgs, be it custom LWC or Aura components we wrote ourselves, or ones in our orgs provided by vendors. This vital security has come at a technical price though, whether through reduced cross-component support or the reduced number of popular third-party JavaScript libraries that would work with Locker Service. Not to fear though, as Lightning Web Security is here to make our lives better.

This new feature – rolling out incrementally following the Spring ‘22 release – brings an improved implementation of all the security features that were in Locker Service, but with several key differences.

  • It is based on web standards, meaning it should evolve in line with wider browser and web technologies
  • Access is opened up to real Javascript global objects, such as document, window, and navigator. For example, you can now use the browser APIs to write to the native clipboard like this (note that you will need to also use the permissions API, which is also available now):
    • navigator.clipboard.writeText();
  • The above access to global objects should mean an immediate increase in supported third-party libraries.
  • There should be a noticeable performance improvement. This is due to no longer needing Locker Services wrappers of the spoof global objects it provided.
  • Your components can import other components and modules and use them via composition or extension.

More information on Lightning Web Security can be found in the documentation here, including how you can test it today, and details on the supporting tooling that should soon be available.

2. Foyer

Although we can already start developing apps to integrate Slack and Salesforce, there’s currently a need to write your own middleware layer to bring the two together. Coming later this year (safe harbor) is a feature called Foyer. Foyer should enable us to focus our development time on the Slack and Salesforce platform sides of the solution alone, dramatically reducing the time needed to build solutions out. Foyer seamlessly brings the middleware into play, allowing it to simply be configured and set up, rather than coding it from scratch.

Foyer was originally announced in September 2021 at Dreamforce and is currently in closed pilot. It will initially be available to ISV partners for inclusion in their AppExchange packages, though now is the time to start chatting with your administrators and start seriously thinking about how these Slack apps can be used to streamline business processes.

You can, as mentioned earlier, start building out Slack and Salesforce integrations right now. You can find out more about Foyer here, and to get started with building Slack apps for Salesforce, this is a great place to start.

3. Flow Trigger Order

Historically there’s not been a way to specify the order in which record-triggered flows should run, which has led to the “one flow per object” best practice and in turn, has led to some rather large flows being constructed. Spring ’22, however, gives us Flow Trigger Order, and although this will be huge for admins, Salesforce developers need to be fully aware of this.

This update now allows for a “Trigger Order” to be specified against before-save or after-save flows. This is a numeric value in the range 1-2000 and, at a high level, flows will run in ascending order, based upon the value of this. Any existing flows without a value for Trigger Order specified will be run following any that have a value set.

Flow is evolving very rapidly and even though there are still some parity gaps between flow and code from a developer’s point of view – it should increasingly be something that’s taken seriously and not be snubbed for Apex without proper consideration.

Further information on Flow Trigger Order can be found in the Spring 22 release notes.

4. UTAM – UI Test Automation Model

This goes GA in spring and enables a more robust approach when implementing automated UI Tests. In the past, these types of tests have been very hard to write and maintain, resulting in the need to often bring in third-party tooling and solutions.

UTAM promises to make this much improved by adopting the common Page Object model design pattern (you may have seen this if you’ve used Selenium for testing before). UTAM’s Page Objects are written in JSON, and the idea is to move away from using XPath locators to target DOM nodes, and instead use CSS.

The proposal is for UTAM to become open source too, and perhaps will even take on a wider role outside of Salesforce specific development. More details on UTAM can be found here.

5. Functions

Salesforce Functions have been GA since the Winter ‘22 release. Some relatively steep pricing – along with other factors perhaps – appear to have led to slow adoption. I, for one, see Functions being the key to making many solutions much simpler and have my fingers firmly crossed that a price reduction or remodeling will make an appearance this year.

If you do have the urge to build with Functions then you can do this right now, both locally and in a development environment. There’s a great blog post on it here.

Summary

I hope you agree with me that there are (fingers crossed) some very exciting things to come in 2022 for Salesforce developers, and I urge you all to keep an eye on the release notes, chatter groups, and of course, the Salesforce Ben blog to help you stay up-to-date with everything that’s coming round the corner.

The Author

Todd Halfpenny

Todd is a Mobile Technical Architect at Caddify, organiser for London's Calling and for the London Developer Trailblazer group, and founder of Shirtforce.

Comments:

    Ian GOtts
    January 24, 2022 4:11 pm
    Also exciting for Developers is Salesforce DevOps Center is beta early 2022 and GA in Summer 2022
    Todd Halfpenny
    January 25, 2022 2:52 pm
    Oh yes... there's a fair amount coming up. It was hard to pick my top five.

Leave a Reply