Table of Contents
Preface
Section 1: Triggers, Testing, and Security
1
Common Apex Mistakes
Null pointer exceptions
Exceptions on object instances
Exceptions when working with maps
Safe navigation operator
Retrieving configuration data in a bulkified way
Hot and cold data
Bulkification – querying within loops
Bulkification – DML within loops
Hardcoding
Summary
2
Debugging Apex
Technical requirements
Debugging on Salesforce
Prevention is better than cure
Log levels
SFDX and streaming logs
Debugging using the Apex Replay Debugger
Apex Interactive Debugger
ISV Customer Debugger
Which tool to use?
Summary
3
Triggers and Managing Trigger Execution
The Salesforce order of execution
An example scenario
The save order of execution
Clicks and code
Get Mastering Apex Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.