Salesforce Apex Triggers 101
Build clean, powerful automation for smarter Salesforce solutions
Master the fundamentals of Apex Triggers, a core element of Salesforce development, in this beginner-friendly, hands-on course. Designed for developers ready to advance beyond declarative automation, you’ll build a solid foundation in Apex and prepare for more complex development patterns and design. Learn when and how to use triggers, write clean, scalable automation, and apply best practices to real-world scenarios, all guided by a Salesforce expert with over a decade of experience in the field.
Learn practical Apex Triggers skills you can use on the job
By the end of the course, you’ll be equipped to handle complex business logic, validations, data aggregation, and automation use cases – giving you the skills to confidently build powerful solutions on the Salesforce platform.

Understand what Apex Triggers are and how they work
Learn the basics of Apex Triggers and how they fit into Salesforce’s automation framework.
Implement triggers for all record events
Build triggers for insert, update, delete, and undelete operations with real-world examples.
Use triggers to automate complex logic
Leverage triggers to default data, validate records, and manage business processes.
Apply best practices for scalable trigger development
Follow methods like one trigger per object, helper classes, and recursion guards.
Build solutions when declarative tools fall short
Know when to go beyond Flow and use triggers for advanced automation.
Manage data across related records with trigger logic
Aggregate and enforce logic across parent-child records with trigger-based solutions.
Innovative learning methods to fast-track your Apex Triggers skills
This course combines interactive and practical learning methods to help you master Agentforce with confidence.
For the best experience and full access to all interactive features, we recommend using a desktop or laptop.
Self-paced learning
Progress through the material at a speed that suits you.
Hands-on Exercises
Work with real coding examples to apply what you've learned.
Expert Guidance
Benefit from instructor-led support to navigate the course material.
Interactive Coding Challenges
Reinforce key concepts through coding exercises and challenges.
Certificate upon Completion
Showcase your achievement with a certificate that validates your skills.

Who should take the Salesforce Apex Triggers course
from Focus on Force?
This course is ideal for learners who already understand the basics of Apex classes and functions, and are familiar with Salesforce objects and how to insert, update, and delete records. We recommend having experience using a Salesforce Developer Org and Visual Studio Code.
- Salesforce developers with basic Apex knowledge.
- Admins or developers transitioning from declarative to programmatic automation.
- Salesforce professionals seeking a structured introduction to triggers.
- Learners who have completed the Focus on Force Introduction to Salesforce Apex course.

Course Outline
Lesson 1
- a. Introduction
b. What are Triggers?
c. Common Use Cases
d. Defaulting Data
e. Validation
f. Complex Business Logic
g. Data Aggregation
Lesson 2
- a. Syntax
b. Events
i. Before Insert
ii. Before Update
iii. Before Delete
iv. After Insert
v. After Update
vi. After Delete
vii. After Undelete
viii. Considerations
c. Context Variable Considerations
d. Exercises
Lesson 3
- a. Implement All the Following in One Trigger by incrementally expanding it with each example.
b. Before Insert
i. Default Field(s)
ii. Validation
c. Before Update
i. Default Fields
ii. Validation
d. Before Delete
i. Delete Other Child Records For Cascade Delete
ii. Validation
e. After Insert
i. Automatically Create Child Records. E.g. create Child Opportunity when Account created
f. After Update
i. Automatically Update Child Records Based on Updates. For example update opportunity names
g. After Delete
i. MasterRecordId only Available in After Delete using Merge Example
h. After Undelete
i. Stamp Undeleted Date on Record Example
i. Exercises
Lesson 4
- a. Reimplement the original Trigger using the Simple Trigger Framework
b. Exercises
Lesson 5
- a. Reimplement the original Trigger using the Metillium Action Framework.
b. Exercises
Lesson 6
- a. Declarative First
b. Bulkified
i. No SOQL in a Loop
ii. No DML in a Loop
c. One Trigger Per Object
d. Logicless
e. Use a Trigger Framework
f. Exercises
Lesson 7
- a. Order of Operations
b. Recursion
c. Many Triggers Per Object Despite You Not Doing It
d. Triggers Don’t Always Fire
i. Full List
e. Some Standard Objects Don’t Allow Triggers
f. Some Fields Not Updateable in Before Triggers
i. Source
g. 1% Test Code Coverage Mandatory
h. Disable Trigger in Sandboxes But Not Production OOB
i. HTTP Callouts Not Allowed From Triggers
j. Exercises

Meet your Salesforce Apex course instructor
Luke Freeland is a 15x certified Salesforce Architect and full-stack developer.
With over a decade of experience in Salesforce development, Luke has created numerous custom Salesforce applications and integrations. He is passionate about training others and has extensive experience teaching Salesforce development and technical skills.
