File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public class OpportunityTriggerHandler extends TriggerHandler {
8787
8888### Bypass API
8989
90- What if you want to tell other trigger handlers to halt execution? That ' s easy with the bypass api. Example.
90+ What if you want to tell other trigger handlers to halt execution? That ' s easy with the bypass api:
9191
9292```java
9393public class OpportunityTriggerHandler extends TriggerHandler {
@@ -112,6 +112,24 @@ public class OpportunityTriggerHandler extends TriggerHandler {
112112}
113113```
114114
115+ If you need to check if a handler is bypassed, use the `isBypassed` method:
116+
117+ ```java
118+ if (TriggerHandler . isBypassed(' AccountTriggerHandler' )) {
119+ // ... do something if the Account trigger handler is bypassed!
120+ }
121+ ```
122+
123+ If you want to clear all bypasses for the transaction, simple use the `clearAllBypasses` method, as in:
124+
125+ ```java
126+ // ... done with bypasses!
127+
128+ TriggerHandler . clearAllBypasses();
129+
130+ // ... now handlers won't be ignored!
131+ ```
132+
115133## Overridable Methods
116134
117135Here are all of the methods that you can override. All of the context possibilities are supported.
@@ -123,6 +141,3 @@ Here are all of the methods that you can override. All of the context possibilit
123141* `afterUpdate()`
124142* `afterDelete()`
125143* `afterUndelete()`
126-
127-
128-
You can’t perform that action at this time.
0 commit comments