I write about the things I work on, often as I work on them. You can find reusable utility code or explanations of my process. Many times there is no clear end and a lot of further work is required. Code samples are usually included. Where it makes sense I include full (sometimes directly deployable) code bundles via GitHub.
Subscribe to new posts
Moving Metadata Between Packages
The dangers of delayed compilation TL; DR; I’ve previously mentioned a handy way to allow moving components between packages during upgrades even up the package dependency hierarchy. It came with a caveat about Custom Labels and more importantly about LWCs components. This article is cautionary tale no. 2. Maybe it’s…
Not so Unlocked Packages
TL; DR; Hard-learned lessons using Unlocked Packages with Namespace. Well worth it when done right and when you know what to not use them for. Learn about the many things you cannot do with them below. Summary[Open][Close]TL; DR;MotivationThe Limitation of Unlocked Packages with NamespaceTests are no longer localCannot change published…
DmlWork a.k.a. the UoW meets Triggers
TL; DR; Building a neat UoW wrapper for compounding standalone service methods effectively and merging the Unit of Work approach together with updating SObject instances in Triggers. Full code on GitHub. Overloaded Often I need to call the same logic from multiple contexts. Typical example would be Before Trigger logic…
SFDX GitHub Code Review – Part 3
TL; DR; Finally making the automated SFDX Pull Request Code Review useful by handling unlimited comments without API Rate Limiting issues, no comment duplication and mainly support for the fancy new Salesforce Graph Engine. A few months back the result of this series was tagged in a GitHub conversation about…
Custom lightning-input-field
TL; DR; Allowing the Label and Helptext of lightning-input-field to be customised while maintaining all the other standard features as part of a record-edit-form. Long story, mostly solved, long way still to go. Setting the Scene A very interesting challenge came my way recently. We have a custom (fairly complicated)…
Test Execution Dashboard
TL; DR; Tool to help with monitoring Test Execution time as you go through development or refactoring intended to encourage writing faster tests and catch things that slow you down. Source here. Problem Well not really a problem necessarily. Imagine you are working in an org that’s been around for…
Deleting Test Results via CLI
TL; DR; Clearing Test Execution History from a Sandbox automatically as a workaround to a known issue with CLI failing to read Test Results with “Cannot read properties of undefined (reading ‘Status’)” error. A lesson in misdirection by expectation and the need for attention to detail in troubleshooting. Context In…
Units of Fun
TL; DR; Peeping into the Unit of Work to help with Batch job chaining and having to really think about who extends who when mocking and testing. Problem The Unit of Work is perhaps the easiest concept from the Enterprise Patterns to grasp and adopt (maybe after Selectors actually). I’m…
Query Caching with Selectors
TL; DR; Building a flexible SOQL query result cache usable with Enterprise Patterns’ Selectors. Skip to code here. Problem We had an existing static cache implementation that I wasn’t very happy with. It was a fairly simple approach, but very repetitive. Imagine a class full of static Maps (one for…
Trigger Performance – Monitoring
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…