I'm trying to pass a value to a variable in an apex trigger from an apex controller in an effort to control whether the the code in the trigger is executed.
In myController initialization, I try to set this variable:
Controller:
public myController() {
CaseTrigger.isComingFromEmail = true;
}
Trigger:
trigger CaseTrigger on Case (before insert){
public static boolean isComingFromEmail = false;
if (isComingFromEmail) {
return;
}
else {
//Actual Processing Here
}
The error received on myController:
Variable does not exist: CaseTrigger
Related post: