The best of TrailblazerDX 2022: Best practices for Apex

The best of TrailblazerDX 2022: Best practices for Apex

TrailblazerDX (formerly known as TrailheaDX) is an event aimed at Salesforce Developers, Architects, Admins and anyone involved within the Salesforce Ecosystem. Of course, we at CaseNine stay up to date with all Salesforce developments, with a particular emphasis on both technical developments and CPQ. In a number of articles, we will explain everything you need to know. Our topic this week will be Apex.

During TrailblazerDX, attention was paid to Apex, among other things. For those who are not yet aware of this: Apex as a language makes it possible for developers to build the back-end on the Salesforce platform and work efficiently with the user data within the platform. If you want to delve deeper into Apex after reading this article, check out this page. Here, you will find a clear explanation of the features and benefits of Apex.

Best practices for Apex

TrailblazerDX also focused on valuable best practices with Apex in 2022. CaseNine’s Lead Engineer has reviewed recommendations and compiled a Top-5 of appealing best practices.


#1 Apex Recipes

Apex Recipes consists of a Github repo with all kinds of useful utilities that you can apply within your project. The utilities not only improve the user experience for the developer, but also help you speed up the development process. The Apex Recipes are also useful in practice if you have relatively little experience with the Salesforce ecosystem.

#2 Field Level Security and CRUD Security

It is important for developers to use FLS (Field Level Security) and CRUD Security. The CanTheUser and Safely classes contain practical examples to help you correctly apply the security features in your project or application.

#3 Caching!

In practice, caching plays a major role in the ultimate performance of your project. Even if you are not satisfied with the performance, it is wise to use the possibilities of caching. With Platform Cache you can keep the use of the database to a minimum. The result: a potential speed gain for your application.

#4 Queuables

Need to process large amounts of data in your Salesforce application? Then take a look at the possibilities of queuables. These enable you to process data serially. In addition, when errors occur in your application, you can solve them using the Transaction Finalizers concept.

#5 Trigger Framework

It is important to streamline the use of triggers. A Trigger Framework allows you to keep more overview and control over the use of triggers within your project. Moreover, a Trigger Framework also makes working with triggers within a project team a lot more pleasant. Use the principle of a trigger per object to maintain an overview. 

We are excited to share more information with you in our TrailblazerDX Series.

Do you want to know more about the benefits of a CPQ solution in practice? Read more background information here or contact us directly for a consultation.

Didn’t find what you were looking for?

Follow us on Social Media

Enjoying the blog?

Transform your Salesforce Application into a CPQ solution.

Receive the latest CPQ, Energy and Telecom blogs straight to your inbox. Disrupt competition with Salesforce industries and integrations.


Subscribe to our Blog today!