I've created two EventSubscribers in a codeunit and I would like to use the global variable for these EventSubscribers.
The variable is define in first EventSubscriber but when code is working on second EventSubscriber. The variable is cleared.
There is any to shared the global variable for each EventSubscriber?
Example code for this scenario.
varGlobalVariable := 'a';
Record.Value = varGlobalVariable;
varGlobalVariable in EventSubscriber 2 is blank when the code is working on it.
EventSubscriber 1 and EventSubscriber 2 are in the same standard function.