Apex.
All posts.
sf-audit 1.17: 14 Salesforce Security Checks for Inbound Email, Platform Events, Data Cloud and Package Installs
sf-audit 1.17 adds 14 read-only checks and two critical attack chains for inbound email, Platform Events, Data Cloud, package installs and Apex system mode.
Intent → Spec → Test on Salesforce: Where Each Layer Lives, From Sandbox to Production
How to apply Intent → Spec → Test on Salesforce: where must-nevers, rules and tests live, which tests run in which org, and how to guard risky metadata.
Intent → Spec → Test: Linking Must-Nevers to Held-Out Tests, and When Not To
How to link must-nevers to rules and hidden tests by ID, keep those tests out of an AI agent's reach, and use the model only where a mistake would be costly.
Salesforce Case Triage With Decision Models: Jev and Laya Against an LLM, Measured
I built one Salesforce case triage process three ways: Einstein, Jev and a self-hosted Laya, on the same 300 cases. Accuracy, speed, cost, and what broke.
Apex Test Data and CI Tooling: What to Use and What It Costs
Test data factories rot, Test.loadData drifts, and a coverage gate on its own proves nothing. How to pick a data approach and wire tests into a pipeline.
Mocking in Apex: Stub API, HttpCalloutMock and ApexMocks Compared
Four ways to isolate Apex under test, from the built-in callout mocks through to fflib ApexMocks, with what each one costs and the design each one demands.
Apex Test Quality: Why 75% Code Coverage Tells You Nothing
Coverage counts lines executed, not behaviour verified. How to write Apex tests that fail when the code breaks, and the anti-patterns that sail past the gate.
Building a Terms Acceptance Gate in Experience Cloud That Actually Fires
A Login Flow cannot gate an Experience Cloud site reached from another. Here is the component and Apex pattern that does, using the standard Consent objects.
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY: The Error Names the Wrong Record
The record you are saving is not the problem. It is the one you are pointing at. How to find the real record and why granting Modify All is the wrong fix.
UNABLE_TO_LOCK_ROW: The Error That Is Really About Your Data
Row lock errors surface in code but are usually caused by data shape. Why retrying makes it worse, and how skew turns a working job into a failing one.
System.LimitException: Too many SOQL queries: 101
The limit is per transaction, not per class, so bulkified code still fails when it is fifth in a trigger chain. How to find the real cause and fix it.
Large Data Volumes: When a Query Stops Being Selective
Selectivity is a threshold, not a property. A query written when an object held 50,000 records fails at two million, with the same filter and no code change.
Why Your Developers Don't Need Modify All Data (And What They Actually Need Instead)
Modify All Data is org-wide read and write that does not even override field-level security. Here are the five real requests behind it, and what each one needs.
Salesforce Summer '26: The SAML Retirement and Apex Secure-by-Default Changes That Break Orgs Quietly
Two Summer '26 changes break orgs without warning: retiring single-configuration SAML stops SSO logins, and Apex now defaults to with sharing. What to check, where.
Fetching Code Metadata from Salesforce with sf CLI: ApexClass, ApexTrigger, LWC, Aura
How to retrieve ApexClass, ApexTrigger, LightningComponentBundle, and AuraDefinitionBundle metadata from Salesforce using sf CLI, for admins who oversee developers or need to deploy code.
Mixed DML Operations: Enterprise User Provisioning Patterns for Salesforce
Master the complex challenge of mixing setup and non-setup object operations in Salesforce user provisioning workflows with production-proven patterns and error handling strategies.
CPU Timeout Resolution: Advanced Debugging and Architecture Patterns for Salesforce Apex
Master advanced techniques for diagnosing, preventing, and recovering from CPU timeout errors in production Salesforce environments with architectural patterns that scale.
Automatic Document Sharing: From Child to Grandparent Records in Salesforce
Learn how to automatically share documents with grandparent records when uploaded to child records using clean, maintainable Salesforce code patterns.