You need to sign in to do that
Don't have an account?

Static flags
Hi all does anyone know why this class
public class staticFlagsForRecursionTriggers
{
public static boolean firstRun = true;
}
Can't be seen by my trigger when i call a controller from a visual force page?
the trigger is :
if(trigger.isAfter && (trigger.isInsert || trigger.isUpdate) && staticFlagsForRecursionTriggers.firstRun == TRUE)
{
handler.calculateTotals(Trigger.new);
staticFlagsForRecursionTriggers.firstRun = FALSE;
}
staticFlagsForRecursionTriggers.firstRun is always false so the trigger isnt running.
Thanks
public class staticFlagsForRecursionTriggers
{
public static boolean firstRun = true;
}
Can't be seen by my trigger when i call a controller from a visual force page?
the trigger is :
if(trigger.isAfter && (trigger.isInsert || trigger.isUpdate) && staticFlagsForRecursionTriggers.firstRun == TRUE)
{
handler.calculateTotals(Trigger.new);
staticFlagsForRecursionTriggers.firstRun = FALSE;
}
staticFlagsForRecursionTriggers.firstRun is always false so the trigger isnt running.
Thanks
Cyrus T
www.levementum.com
https://developer.salesforce.com/page/Trigger_Frameworks_and_Apex_Trigger_Best_Practices