top of page
Inpoll Logo

Category

Send Survey
Related Articles

Events

Last Modify: 

14 Nov 2024

Events 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 events 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.



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

  1. After Insert

  2. After Update 

  3. After Delete


Event

Working

After Insert

Trigger executes due to an insert operation but after the record is saved to the database it is an after Insert 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.

After Delete


A trigger that executes after a record is deleted. The After Delete trigger runs once the record is removed, meaning the record no longer exists in the database. This is typically used to perform actions like cleaning up related data or performing logging after deletion.


Note:

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

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

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



Book a free demo session

Customers transforms their business with InPoll.

bottom of page