Navision Timer 1.0'.Timer

Deepankar1982
Member Posts: 38
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
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
-
Hi,
Did you already set the SingleInstance property of the codeunit to Yes?Reijer Molenaar
Object Manager0 -
Yes, i did that after going to "Properties" from "View" & thanks for ur quick response.
Deepankar Chanda0 -
When you make change to a single instance codeunit you will have to restart NAV (or reopen the company).Reijer Molenaar
Object Manager0 -
I am afraid to say that, i did that too
...and yes, i am using Navision 2009 Classic Client.
0 -
Strange... :-k
Can you please export your codeunit in textformat and post it here.Reijer Molenaar
Object Manager0 -
Sure Why not....
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.
}
}0 -
Sorry, I am out of options.
The codeunit is working fine in my database...Reijer Molenaar
Object Manager0 -
The NTimer is not working properly when the Business Notification server is installed on the same machine. May be this is the problem...0
-
Oh ! It's really :-# then i also have no words to frame it ....rather than ](*,) ...lets see, thanks a ton.0
-
No, i didn't install business Notification server in my local System....but it's really frowning to me the way it's behaving, u wouldn't believe it's still not working .....0
-
1) How did you run the codeunit?
2) Have you some other error during this process?
3) Check your event log for any error0 -
If you do something like this:
CODEUNIT.RUN(CODEUNIT::"Nav_Timer"); WHILE TRUE DO BEGIN // do something END;
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.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Yessss, it has been Done at last :whistle: Thanks people 4 ur kind & quick support... =D>0
-
Deepankar1982 wrote:Yessss, it has been Done at last :whistle: Thanks people 4 ur kind & quick support... =D>Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
My that piece of code was not running i think due to some NAS error so, i repaired it after running the Navision Setup and after that it worked ..... \:D/0
-
https://blogs.msdn.microsoft.com/nav/2015/01/28/timer-usage-in-microsoft-dynamics-nav-2013/ here is timer for navision 2013 + versions how to use timer and probably errors and fix0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions