top of page
Inpoll Logo

Category

Send Survey
Related Articles

Triggers

Last Modify: 

6 Aug 2024

Triggers are like stored procedures that execute when a particular event occurs. A trigger executes before and after an event occurs on record. Triggers enable us to perform custom actions before or after changes to Salesforce records. 


It's important to note that the use of triggers should be carefully planned and tested, as they can have an impact on performance and can cause unintended consequences if not used correctly. It's also important to keep in mind that Salesforce has limits on the number of triggers that can be executed for a single transaction, so it's important to ensure that your triggers are efficient and avoid using excessive numbers of triggers. Additionally, the best practice is to use Apex classes and methods to handle complex business logic, rather than relying heavily on triggers.


Survey Trigger Select event image


The following are lists of considerations about actions of different trigger events:  

  1. Before Insert 

  2. After Insert

  3. Before Update 

  4. After Update 


Trigger Event

Working

Before Insert 

Trigger executes due to an insert operation and before the record is saved to the database it is a before Insert trigger.

After Insert

Trigger executes due to an insert operation but after the record is saved to the database it is an after Insert trigger.

Before Update

Trigger executes due to an update operation and before the record is saved to the database it is a before update trigger.

After Update

Trigger that executes due to an update operation and after the record is saved to the database it is an after-update trigger.


Note:

  • You can not edit the selected trigger. but you can add one more distribution with another trigger.

  • You can not create a new trigger with the same name as an old trigger name.

  • If you added a filter field in the create trigger, the trigger will not fire before true the filter condition.

Book a free demo session

Customers transforms their business with InPoll.

bottom of page