You need to sign in to do that
Don't have an account?
Reg - Usage of Global Variables in Global Class
Hi,
I have been wondering why the usage of Global variables are different in Global as well as public Classes.
Scenario 1 :
I have declared a Global Variable in public class and passed the varaible to the other methods in the same class or different class as a reference and was able to get the values in my global variable.
Scenario 2:
I have declared a Global Variable in Global class and passed the varaible to the other methods in the same class or different class as a reference and was not able to get the values in my global variable. It was coming as null values most of the times and was working some times.
I wonder what should be the difference between those two scenarios. When i make it as Static Global variable it works for me then again that will effect the Functionality if we are calling the classes asynchronoulsy.
Is the a salesforce bug
Any thoughts...................
Thanks
Mohan