Apex articles
Page 4 of 9 · 106 articles
Beating 6MB Apex Heap Limit: Native Document Generation
An architecture that generates PDFs with embedded images and large record sets inside Apex governor limits. Binary data...
Dynamic SOQL in Loops: Security Review Impact for Managed Packages
Dynamic SOQL inside a loop does not fail Salesforce Security Review for a managed package, because the scan treats it...
Salesforce Spring '26 - Apex Cursors and LWC Expressions
I've been testing the Salesforce Spring '26 preview, and the new Apex Cursors change what is realistic for large data...
Mastering the Apex Approval Process for Complex Logic
Standard approval tools are great, until they aren't. Here is how I use Apex to handle the complex routing and bulk...
Guide to the Apex Zip Namespace in Salesforce Spring '25
Salesforce finally added a native way to handle zip files without AWS or external libraries. Here is how ZipWriter and...
How to Stay Under Asynchronous Apex Limits in Salesforce
Ever hit a 'Too many future calls' error right before a big deployment? It happens to the best of us, and it usually...
How to Use Apex Cursors to Stream Large Datasets in LWC
If you are tired of hitting heap limits when loading records into LWC, look at Apex Cursors. They handle large data...
8 Practical Agentforce Use Cases for Salesforce Developers
I've been experimenting with Vibe coding and it has changed how I approach legacy projects. Here are 8 ways Agentforce...
Calculate Apex Business Hours and Day of Week in Salesforce
Stop letting weekends wreck your lead response reports. Here is the Apex I use to find the day of the week and count...
Apex vs Flow - When to Use Code Over Salesforce Automation
We've all heard the 'Flow First' mantra, but sometimes you want the power of code. Here is where I stop building Flows...
Apex Trigger Upsert - How Many Times Does It Execute?
Your automation runs twice during an upsert because Salesforce splits the records into two buckets before the trigger...
System.setPassword in Apex: Set a Salesforce User's Password
System.setPassword(userId, password) sets a Salesforce user's password from Apex in one line, with no reset email. The...