Getting Started

  • What is Trailhead
  • myTrailhead
  • Trailblazer Community
  • Career Growth

Learn

  • Trails
  • Trailmixes
  • Modules
  • Projects

Credentials

  • Superbadges
  • Certifications
  • Maintain Certifications

Salesforce

  • Salesforce.com
  • AppExchange
  • Developers
  • Help Portal
© 2026 Salesforce, Inc. All rights reserved. Privacy Terms of Use Trust Accessibility Cookie Preferences
SalesforceTrailhead
  • Today
Apex Triggers

Bulk Apex Triggers

+500 Points~45 minsHands-On Challenge
Apex TriggersBulk Apex Triggers

Org:Mindful Goat Playground

Topics

  • Concepts
  • Hands-On Challenge

Looking for help?

Explore Help ResourcesShare Your Feedback
Learning Objectives

After completing this unit, you'll be able to:

  • Write triggers that operate on collections.
  • Perform efficient SOQL and DML in triggers.

Concepts

Triggers fire on up to 200 records at a time. Bulk triggers loop over Trigger.new, query once outside the loop, and run DML once on a list.

Hands-On Challenge

  1. Create a trigger ClosedOpportunityTrigger on Opportunity, after insert and after update.
  2. For each opportunity with stage Closed Won, create a task with subject Follow Up Test Task.
  3. Insert all tasks with one DML statement.
Check ChallengeDemo check
Previous unitGet Started with Apex TriggersBack to badge Apex Triggers