You need to sign in to do that
Don't have an account?
c_r_carvalho
Attempty to de-reference a null object
Hi,
I have a class with a static variable and i'm trying to access this variable from a trigger and a receive this error.
But this error happens in production environment only.
Someone tell me why?
Example class:
public class CustomClass{
public static boolean run = false;
/*
CODE HERE
*/
}
Example trigger:
trigger CustomObject on CustomObject__c(before insert, before update){
if( CustomClass.run ) return;
//CODE HERE
}
Thank you!
I have a class with a static variable and i'm trying to access this variable from a trigger and a receive this error.
But this error happens in production environment only.
Someone tell me why?
Example class:
public class CustomClass{
public static boolean run = false;
/*
CODE HERE
*/
}
Example trigger:
trigger CustomObject on CustomObject__c(before insert, before update){
if( CustomClass.run ) return;
//CODE HERE
}
Thank you!
Hello carvalho,
the sobject or any variable you use to Insert or Update is empty. and thats why u receiving the error.
Thanks
D Naveen Rahul.