A Progressive Apex Trigger Framework

If you work on a larger Salesforce Org, you probably need a trigger framework to implement the single trigger per SObject best practice. This is especially challenging when you work on multiple, well-separated second-generation packages (2GP). Requirements for a...

A Library To Mock SObject Records

If you plan to write solid unit tests in Salesforce, you won’t get around mocking sobjects. A solid testing strategy needs a powerful library to mock sobject records. This allows you to write loosely coupled tests without the need to insert records into the...

Solve „Unable To Lock Row“ Error In Tests

There seems to be a soft limit for E2E tests in Salesforce. Once you hit it, your tests will start to fail with the dreaded „unable to lock row“ exception. This is one of the nastiest errors you can encounter, especially in tests. It’s hard to debug...

How Many Apex Triggers Per Object?

I recently came across a stone-old question: How many apex triggers per object are a best practice? Is the „single apex trigger per object“ dogma still en vogue after the introduction of SFDX? Why Are Multiple Apex Triggers Per Object Considered Bad? A...

Prettier for SFDX: Format Apex and LWC

Prettier is essential for professional software developers. It is more than just a code-formatter, it is an opinionated code-formatter. I will spare you the repetition of the discussion whether this is good or bad and cut straight to the point: How to add Prettier to...