Hi, so i wonder how long (global ) variable values are stored during runtime. Lets say i want to pass an error message (from CodeUnit A ) to another code unit ( CU B ) . could i for example store it in a global variable in CU A , call another CU B and then pull the global variable from CU A through a get-function? Or is there an even easier way ?
Cheers
0
Answers
A self-written get-function is the proper way to do it.
It can even be stored longer than runtime, using the single instance property of the Codeunit.
But the normal way of doing things is passing variable from CU A to CU B when calling CU B.