Global Variable OR Use a variable value in any Methods.

Is there any type of variable we can define in ax which can be used and modified in any of the methods in Classes.

As an alternative I defined a table with a field(Type :Integer) named Flag but whenever I used that Field in any other class It returns the value as 0 which is default value of type :: Integer.

Eg.Global table with GlobalVariable set as value 5

when I used this GlobalVariablein some classes it gives vaue as “0”(zero).

Please let me know If there is any sloution to this Issue.

Thanks and Regards,

Vikas Mehta.

If you need a global variable then you can use the SysGloblalCache class for this.

If the variable has a constant value you can make use of Macros…

No the variable is not constant I might hard code its value to be changed between two different methods.