Experience Salesforce
Basics of Triggers
What You’ll Learn
- What Is Triggers In Apex?
Topics
- Basics of Triggers
- When to use triggers
- Types of Apex Triggers in Salesforce
- Trigger Order of Execution
- Trigger Context Variables in Salesforce
- Trigger.new in Salesforce| Context Variables in Apex Triggers
- Trigger.old in Salesforce | Context Variables in Apex Triggers
- Trigger.newMap in Salesforce| Context Variables in Apex Triggers
- Trigger.oldMap in Salesforce| Context Variables in Apex Triggers
- Trigger Exceptions
- Best Practice in Triggers
- Trigger Helper Class Pattern
There are many actions that take place in Salesforce. To make these tasks easier, the trigger function was specifically designed to trigger action once a new record is created and old records are deleted or updated. In this chapter, we will learn about the basics of Apex Trigger And how you can create one.
What is the Salesforce Apex Trigger?
Salesforce Apex Trigger is an Apex code that executes before or after changes occur to Salesforce records. It is one of the most important functions and topics in the Apex Program.
For example, you can have a trigger run before an object’s records are inserted into the database, after records have been deleted, or even after a record is restored from the Recycle Bin.
Next TopicNeed Extra Support? Our FREE study materials have got you covered.
Our expert-prepared study materials provide the answers you need. Clear your doubts and improve your skills with detailed notes from industry professionals.