before insert |
Allowed. |
Not applicable. The original object
has not been created; nothing can reference it, so nothing can update
it. |
Not applicable. The original object
has not been created; nothing can reference it, so nothing can update
it. |
after insert |
Not allowed. A runtime error is thrown, as trigger.new is already saved. |
Allowed. |
Allowed, but unnecessary. The object is deleted immediately
after being inserted. |
before update |
Allowed. |
Not allowed. A runtime error is thrown. |
Not allowed. A runtime error is thrown. |
after update |
Not allowed. A runtime error is thrown, as trigger.new is already saved. |
Allowed. Even though bad code could cause an infinite recursion
doing this incorrectly, the error would be found by the governor limits. |
Allowed. The updates are saved before the object is deleted,
so if the object is undeleted, the updates become visible. |
before delete |
Not allowed. A runtime error is thrown. trigger.new is not available in before
delete triggers. |
Allowed. The updates are saved before the object is deleted,
so if the object is undeleted, the updates become visible. |
Not allowed. A runtime error is thrown. The deletion is already
in progress. |
after delete |
Not allowed. A runtime error is thrown. trigger.new is not available in after
delete triggers. |
Not applicable. The object has already been deleted. |
Not applicable. The object has already been deleted. |
after undelete |
Not allowed. A runtime error is thrown. trigger.old is not available in after
undelete triggers. |
Allowed. |
Allowed, but unnecessary. The object is deleted immediately
after being inserted. |