Monday, October 28, 2019

What are TRIGGER EVENTS in Salesforce?


Using events we specify when our block of code inside TRIGGER should execute. The events which we can specify are as below:

·       Before insert
·       After insert
·       Before update
·       After update
·       Before delete
·       After delete
·       After undelete

For example, the following code defines a trigger for the before insert and before update events on the Contact object:

trigger myAccountTrigger on Contact (before insert, before update) {
    // Your code here
}

No comments:

Post a Comment