Query Caching with Selectors
Building a flexible SOQL query result cache usable with Enterprise Patterns’ Selectors.
Building a flexible SOQL query result cache usable with Enterprise Patterns’ Selectors.
Pragmatic Bears’ Way shared by Aleš Remta. Using Twitter to learn about Release notes, adjusting VS Code and more
TL; DR; Creating a Logger to measure Limit usage in Apex and building Dashboard to monitor improvements (or otherwise) over time. The Problem Reviewing the logs is not easy. Sometimes, it’s even impossible. There is a limit to how much can be stored and the rest gets omitted. And having… Read More »Trigger Performance – Monitoring
Analysing trigger performance issues in Salesforce triggers and preparing a strategy for effective improvements taking complexity and risk into consideration
TL; DR; Finding the right “position” in the diff view for a GitHub Review Comment from a line number in static analysis report. Current version of the GitHub Action is published. Help me test and improve it. The Scene You can read how this all started in my previous post.… Read More »SFDX GitHub Code Review – Part 2
TL; DR; Building a GitHub Action to do code review on a Pull Request using Salesforce Code Analyzer CLI plugin. (previously known as Code Scanner). Check out the current version on GitHub or jump down a few paragraphs to skip the intro waffling. I originally wrote this post at the… Read More »SFDX GitHub Code Review – Part 1
TL; DR; Standardising mocking throughout your code base in the simplest way possible without mixing test-only and production code. See on GitHub or below (in full) The Problem Mocking in (Apex) unit tests is very useful. There are, however, a few challenges to it. How exactly do you replace the… Read More »Class Factory
TL; DR; Apex utility wrapping DML operations and logging their results consistently. And a mock version of the same allowing to do “pretend” DML in Unit Tests. Full source on GitHub (link). The Problem Not really a problem to be honest. It started with a desire to reduce duplication in… Read More »DML (Mock) Service
Writing good tests is hard. Complex repetitive setup code is often seen and tests run very slow. One way to improve is to gradually introduce mocking. The post tries to make this as easy as possible.
TL; DR; (Fairly) efficient algorithm to organise Accounts into hierarchies in Apex and update fields in those hierarchies accurately. You can jump straight to the code if you’d like or read on. The Problem There are Account fields that need to be propagated down the hierarchy when they change (but… Read More »Account Hierarchy Update