You need to sign in to do that
Don't have an account?
Vetriselvan Manoharan
Setting public variable
Hi,
I am having a flag which is public variable in the class(with sharing). I am assigning values to that variable inside the constructor of that class and I want to check the value of that flag throughout my application(force.com website). But if I try to access it in another class, the value is coming as null. Can anyone help me with this?
I am having a flag which is public variable in the class(with sharing). I am assigning values to that variable inside the constructor of that class and I want to check the value of that flag throughout my application(force.com website). But if I try to access it in another class, the value is coming as null. Can anyone help me with this?
Have you first made the instance of that class(with sharing) in which you have assigned the value of the Public variable in your another class?
Thanks
Nitin
All Answers
Have you first made the instance of that class(with sharing) in which you have assigned the value of the Public variable in your another class?
Thanks
Nitin
Refer following code sample -
Hope it help !!!!
Regards,
Santosh Chitalkar