Navision Timer Control don't fire trigger

dakyndakyn Member Posts: 36
Hi guys,
:-k

I create a codeunit and I implemented Automation Control Timer of Navision that I called Orologio, when I run codeunit the "Orologio::Timer" never happens,
WHY????
where am I being wrong? ](*,)

This is code:
OnRun()
IF CREATE(Orologio) THEN BEGIN
  Orologio.Interval:=3000;
  Orologio.Enabled(TRUE);
END ELSE
  ERROR('Timer not initialized');

Orologio::Timer(Milliseconds : Integer)
MESSAGE('Running ...');
MyReport.USEREQUESTFORM := FALSE;
MyReport.RUN;
MESSAGE('Running Completed');

Orologio::TimerError(ErrorString : Text[1024])
ERROR(ErrorString);
Thanks for support, bye.

Comments

  • jreynoldsjreynolds Member Posts: 175
    You must make the codeunit a single instance codeunit. Otherwise the codeunit finishes running and is cleared from memory and the timer never has a chance to fire.
Sign In or Register to comment.