function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KMK91KMK91 

what are the type of triggers?

Best Answer chosen by KMK91
jyothsna reddy 5jyothsna reddy 5
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..).

All Answers

sfdc Beginnersfdc Beginner
Hi Madhukar,

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
ManojjenaManojjena
Hi Madhukar,
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
KMK91KMK91
I'm Asking types of trigger?
ManojjenaManojjena
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 .

 
jyothsna reddy 5jyothsna reddy 5
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..).
This was selected as the best answer
Gary RalstonGary Ralston
Hi,

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.