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