Free Salesforce Developers Tutorials >

Chapter - 9 Apex Triggers >

When to use triggers

When to use triggers

What You’ll Learn


tickWhen to use Apex Triggers

S2 Labs

When To Use Triggers In Apex?

1. An Apex Trigger is a Stored Apex procedure that is called whenever a record is inserted, updated, deleted, or undeleted. If any change happens to single or multiple records, the Apex Trigger created on that object will be fired.

For example, we can have a trigger run:

  • Before an object’s record is inserted into the database.
  • After a record has been deleted.
  • Even after a record is restored back from recycle bin.

2. Use triggers to perform tasks that can’t be done using a point & click tool in Salesforce. If the task is possible using point & click tools then always prefer doing it from them.

3. Triggers are active by-default when created and Salesforce automatically fires active triggers when specified database event occurs.

Salesforce Developer

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners . But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *