← All articles

Tag

Apex

17 articles

How I Use Claude Code to Write Apex 5x Faster

·7 min read

The actual workflow I run for AI-assisted Apex development — what AI handles well, what it gets wrong, and the prompts that survive code review.

AI-Assisted Salesforce Data Migration: A Real Walkthrough

·9 min read

How I actually use AI across a Salesforce data migration — profiling, field mapping, and the transform Apex — plus the near-miss that set my one hard rule.

AI-Generated SOQL: Surprisingly Good, Occasionally Dangerous

·8 min read

AI writes cleaner SOQL than I do at 5pm — right relationships, right field names. But it can't see your data volumes. Here's where it helps and hurts.

Using AI to Generate Apex Test Classes: What Works and What Doesn't

·9 min read

AI can hit Apex code coverage in seconds, but coverage was never the point. Here is what AI test generation gets right, where it fails, and how I use it.

SOQL Patterns That Won't Kill Your Governor Limits

·9 min read

The SOQL antipatterns I keep finding in code review, the patterns that replace them, and the trade-offs nobody explains — from years of production Salesforce.

AI Code Review for Apex: My Workflow

·10 min read

How I run AI code review on Apex pull requests: the pipeline, the prompt rubric that cuts the noise, and the bulkification bugs two tired humans skim past.

Async Apex Patterns: Queueable vs Batch vs Future — The Decision Tree

·9 min read

Choosing between Queueable, Batch Apex, and Future methods is the asynchronous decision most Salesforce devs get wrong. Here's the framework I use, and the cases where the obvious choice is wrong.

REST API Integration Patterns for Salesforce

·9 min read

The REST integration patterns I actually use in production Salesforce orgs: named credentials, async callouts, idempotency, and when to skip REST entirely.

Apex Test Patterns: How to Write Tests That Actually Catch Bugs

·9 min read

Most Apex tests pass coverage and catch nothing. The patterns that actually catch bugs — test data factories, behaviour assertions, governor limit checks, and the bulk cases everyone skips.

Dynamic SOQL Done Safely

·9 min read

Dynamic SOQL fails more AppExchange security reviews than almost anything. Here's how I build queries that can't be injected — binds, allowlists, user mode.

CRUD/FLS Enforcement: Why Most Apex Code Fails Security Review

·7 min read

The CRUD and FLS enforcement patterns that actually pass AppExchange security review — and the antipatterns the scanner keeps flagging.

Error Handling in Apex: Beyond Try-Catch

·9 min read

Try-catch is where Apex error handling starts, not where it ends. Custom exceptions, persisted logs, partial-success DML, and errors that survive a rollback.

Sharing Rules vs Manual Sharing vs Apex Sharing: When to Use What

·9 min read

Sharing rules, manual sharing, or Apex managed sharing? After years spent untangling Salesforce security models, here's how I decide which one to reach for.

A Trigger Framework That Actually Scales

·5 min read

Most Salesforce orgs start with a handful of triggers and end up with a mess. Here's the framework I've used across government, financial services, and ISV orgs — and why the boring parts matter most.

Record-Triggered Flows vs Apex Triggers: The Decision Framework

·9 min read

Record-triggered flows or Apex? I've built both in production for years. Here's the exact framework I use to decide, and where each one quietly falls apart.

Custom Metadata Types: The Swiss Army Knife You're Underusing

·9 min read

Most admins use custom metadata for one lookup table and stop. Here's how I use it to kill hardcoded config, dodge governor limits, and keep rules in source.

Domain Layer Patterns in Apex That Survive Real Projects

·9 min read

The domain layer patterns I actually use in production Apex — how fflib domain classes plug into triggers, where validation belongs, and when it's overkill.