Hi,
I want to generate an information message at a specific time so i am using "Navision Timer 1.0'.Timer" automation and to test it i have added the bellow given code on a newly created Codeunit but as per my expectation it's not working so, can anyone help me out & say where i am doing wrong :roll: ...
IF ISCLEAR(NavTim) THEN
CREATE(NavTim);
NavTim.Interval:=10000;
NavTim.Enabled:=TRUE;
Event :NavTim::Timer(Milliseconds:Integer)
Message('Hi');
Deepankar Chanda
0
Comments
Did you already set the SingleInstance property of the codeunit to Yes?
Object Manager
Deepankar Chanda
Object Manager
Can you please export your codeunit in textformat and post it here.
Object Manager
OBJECT Codeunit 50021 Nav_Timer
{
OBJECT-PROPERTIES
{
Date=07/27/09;
Time=[ 2:52:06 PM];
Modified=Yes;
Version List=;
}
PROPERTIES
{
SingleInstance=Yes;
OnRun=BEGIN
IF ISCLEAR(NavTim) THEN
CREATE(NavTim);
NavTim.Interval:=6000;
NavTim.Enabled:=TRUE;
END;
}
CODE
{
VAR
NavTim@1000000000 : Automation "{3B311C81-140E-11D5-8B18-00D0590B4EC5} 1.0:{3B311C92-140E-11D5-8B18-00D0590B4EC5}:'Navision Timer 1.0'.Timer" WITHEVENTS;
EVENT NavTim@1000000000::Timer@1(Milliseconds@1000000000 : Integer);
BEGIN
MESSAGE('hi');
END;
EVENT NavTim@1000000000::TimerError@2(ErrorString@1000000000 : Text[1024]);
BEGIN
MESSAGE('hi');
END;
BEGIN
END.
}
}
The codeunit is working fine in my database...
Object Manager
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
2) Have you some other error during this process?
3) Check your event log for any error
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The timer will never be triggered.
In will only be triggered if NAV is waiting for input.
So, in the NAS, you need to launch the codeunit and then NAV has to go to the end of the function and stop doing something.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!