Hi All
I've got a codeunit 50001 that is started with NAS and JOBQUEUE.
This codeunit has functions to init a variable 'Start' to TRUE or FALSE and it messages to event viewer in windows that variable:
OnRun()
DoIt;
DoIt()
MESSAGE('DoIt %1',Start);
StartON()
Start:=TRUE;
MESSAGE('Started:%1',Start);
StopOff()
Start:=FALSE;
MESSAGE('Stopped:%1',Start);
setBool(Bool : Boolean)
Start:=Bool;
getBool() : Boolean
EXIT(Start);
Then I've got a PAGE that has a button to call the StartON() function to init the 'Start' to TRUE.
If I go to the PAGE an hit the button to call the StartON() function imodifies the 'Start' to TRUE.
If I open other page similar to this one that has call for the function getBool() it says 'YES', so the single instance codeunit is working between pages. The 'Start' is set to 'YES' because I set it TRUE on first PAGE.
But in the EventViewer triggered by NAS I can see every minute events with the 'DoIt NO'.
Resuming: The singleInstace codeunit works fine but for some reason NAS seems to catch other instance of the same codeunit.
Can someone hep me?
Thanks
Miguel Costa
0
Comments
In order to obtain what you want here, you will need a database table to store the global values.
Microsoft - Dynamics NAV