Types of Triggers: – Before Triggers – After Triggers
Before Trigger: Before triggers are used to perform the logic on the same object and specifically we cannot use the DML operation (Insert, update, delete) on these triggers. These triggers are fired before the data is saved into the database. After Trigger: After triggers are used to perform the logic on the related objects and these triggers are used access the fields values that are created by system (Ex: CreatedBy, LasteModifiedBy , Record Id etc..).
Hi Madhukar, Have you read the content of the blog .Basically there is no such definite type of trigger . Based on the event you can differentiate trigger into two types .After and Before .
What sfdc Beginner has already descibed in the above post .
Types of Triggers: – Before Triggers – After Triggers
Before Trigger: Before triggers are used to perform the logic on the same object and specifically we cannot use the DML operation (Insert, update, delete) on these triggers. These triggers are fired before the data is saved into the database. After Trigger: After triggers are used to perform the logic on the related objects and these triggers are used access the fields values that are created by system (Ex: CreatedBy, LasteModifiedBy , Record Id etc..).
In Salesforce, triggers are pieces of code that are executed before or after specific events occur, such as when a record is created, updated, or deleted. There are two types of triggers in Salesforce:
Before Triggers : These triggers executebefore the record is saved to the database, allowing you to modify or validate the record before it is saved.
After Triggers : These triggers executeafter the record is saved to the database, allowing you to perform additional actions, such as sending email notifications or creating related records.
Both before and after triggers can be further classified into the following types:
Insert Triggers : These triggers are executed when a new record is created.
Update Triggers : These triggers are executed when an existing record is updated.
Delete Triggers : These triggers are executed when a record is deleted.
Undelete Triggers : These triggers are executed when a record is recovered from the Recycle Bin.
Looking for in-depth information on Salesforce triggers? Check out the article at https://arrify.com/triggers-in-salesforce/ for a complete guide on triggers in Salesforce, including detailed explanations and examples.
– Before Triggers
– After Triggers
Before Trigger: Before triggers are used to perform the logic on the same object and specifically we cannot use the DML operation (Insert, update, delete) on these triggers.
These triggers are fired before the data is saved into the database.
After Trigger: After triggers are used to perform the logic on the related objects and these triggers are used access the fields values that are created by system (Ex: CreatedBy, LasteModifiedBy , Record Id etc..).
All Answers
There are two Types of Triggers
1) Before Triggers
Before Triggers are Mainly used for
a) Validation Check on the Same Object
b) Updating the records of the Same Object
2) After Triggers
After Triggers are Mainly used for
a) Insert or Update related object records.
b) Sending emails etc...
If this solves your Problem, Mark it as the Best Answer.
Thanks,
sfdc Beginner
check belwo link it will give you some basic concepts of trigger .
http://manojjena20.blogspot.in/2013/03/manojs-trigger-blog.html
let me know if it helps !!!
Thanks
Manoj
Have you read the content of the blog .Basically there is no such definite type of trigger . Based on the event you can differentiate trigger into two types .After and Before .
What sfdc Beginner has already descibed in the above post .
– Before Triggers
– After Triggers
Before Trigger: Before triggers are used to perform the logic on the same object and specifically we cannot use the DML operation (Insert, update, delete) on these triggers.
These triggers are fired before the data is saved into the database.
After Trigger: After triggers are used to perform the logic on the related objects and these triggers are used access the fields values that are created by system (Ex: CreatedBy, LasteModifiedBy , Record Id etc..).
In Salesforce, triggers are pieces of code that are executed before or after specific events occur, such as when a record is created, updated, or deleted. There are two types of triggers in Salesforce:
- Before Triggers : These triggers execute before the record is saved to the database, allowing you to modify or validate the record before it is saved.
- After Triggers : These triggers execute after the record is saved to the database, allowing you to perform additional actions, such as sending email notifications or creating related records.
Both before and after triggers can be further classified into the following types:- Insert Triggers : These triggers are executed when a new record is created.
- Update Triggers : These triggers are executed when an existing record is updated.
- Delete Triggers : These triggers are executed when a record is deleted.
- Undelete Triggers : These triggers are executed when a record is recovered from the Recycle Bin.
Looking for in-depth information on Salesforce triggers? Check out the article at https://arrify.com/triggers-in-salesforce/ for a complete guide on triggers in Salesforce, including detailed explanations and examples.