The best of TrailblazerDX 2022: Best-practices for Apex
TrailblazerDX (formerly known as TrailheaDX) is a Salesforce event aimed at Salesforce developers, architects, admins, and anyone who works with…
Key Points
- Most revenue leakage isn't visible on a dashboard. It's hidden in price discounts, out-of-control automation, and manual reconciliation.
- A targeted diagnosis can determine in minutes what an internal audit often takes weeks to determine.
- A free check is a good start, but most people stop at the configuration and don't get to the revenue stream itself.
- The right approach depends on the complexity: a light review for a simple environment, and more in-depth engineering for a layered one.
- Ask for a report that outlines priorities, not a general checklist.
Brief Assessment
For most teams, a targeted assessment like Revenue at Risk is the quickest way to get started: it’s free, takes about ten minutes, and doesn’t require access to your systems. Save a full discovery for organizations with years of accumulated complexity.
TrailblazerDX (formerly known as TrailheaDX) is a Salesforce event aimed at Salesforce Developers, Architects, Admins and anyone else dealing with the platform. Naturally, we at CaseNine keep a close eye on developments. In a series of articles, we recount the most important developments that were covered during TrailblazerDX.
During TrailblazerDX, one of the topics discussed was Apex. For those not yet aware of it, Apex as a language allows developers to build the back-end on the Salesforce platform and work efficiently with user data within the platform. If, after reading this article, you want to go in depth with Apex, also take a look at this page. Here you will find a clear explanation of the features and benefits of Apex.
Best practices for Apex
During TrailblazerDX, the focus included valuable best practices with Apex in 2022. CaseNine's Lead Engineer reviewed recommendations and compiled a Top-5 of appealing best practices.

#1 Apex Recipes
Apex Recipes consists of a Github repo containing 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 when you still have relatively little experience with the Salesforce ecosystem.
#2 Field Level Security and CRUD Security
For developers, it is important to use FLS (Field Level Security) and CRUD Security. The classes CanTheUser and Safely contain practical examples to help you correctly apply security features in your project or application.
#3 Caching!
In practice, caching plays a big role in the final performance of your project. Even when you are not satisfied with the performance, it is wise to employ the capabilities of caching. With Platform Cache, you can minimize database usage. The result: a potential speed gain for your application.
#4 Queuables
Do you need to process large amounts of data in your Salesforce application? Then take a look at the capabilities of queuables. These allow you to process data on serialization. Moreover, when errors occur in your application, you can resolve them using the Transaction Finalizers concept.
#5 Trigger Framework
It is important to streamline the use of triggers. With a Trigger Framework, you 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 one trigger per object to maintain an overview.
Want to learn more about the real-world benefits of a CPQ solution? Read more background information here.
Share this article
Find the leak before it finds your margin
Revenue at Risk is free, takes about ten minutes, and doesn't require access to your systems. You'll receive a clear report with priorities, reviewed by an engineer—never by a chatbot.