Navision Timer doesn't work in combination with NAS
Gollum83
Member Posts: 19
Hi everybody
I have a big problem:i have a working NAS, which executes correctly my
codeunits, but NAS doesn't his job when there is a Navision Timer in the
codeunit.
Example of my code:
(OnRun):
IF ISCLEAR(Timer) THEN
CREATE(Timer);
Timer.Interval(10000);
Timer.Enabled(TRUE);
Timer::Timer(MilliSeconds: Integer)
MESSAGE('Time is %1',TIME);
There is a correct startup Parameter in CU1 NASHandler, all correct installed, but this example doesn't work, there aren't messages in the eventlog every 10 seconds, there is nothing.
Could you please help me.
I have a big problem:i have a working NAS, which executes correctly my
codeunits, but NAS doesn't his job when there is a Navision Timer in the
codeunit.
Example of my code:
(OnRun):
IF ISCLEAR(Timer) THEN
CREATE(Timer);
Timer.Interval(10000);
Timer.Enabled(TRUE);
Timer::Timer(MilliSeconds: Integer)
MESSAGE('Time is %1',TIME);
There is a correct startup Parameter in CU1 NASHandler, all correct installed, but this example doesn't work, there aren't messages in the eventlog every 10 seconds, there is nothing.
Could you please help me.
0
Comments
-
Is your codeunit a single instance codeunit? Object designer, codeunit, open it in design mode, open property page. The SingleInstance property has to be 'Yes'.
Then you are doing MESSAGE in a NAS. This will not display the message the way you expect. It will instead write an entry into the event log. Click Start, control panel, administrative tools, event viewer. Click on the Application node and look for where the source column has your NAS name. You should find your messages there.0 -
Additionally, the nettype should be TCP, without the S at the end. This property is not available in the mgt snap-in for certain versions of NASSQL, so you will have to use the command line parameters and re-install NAS.0
-
The Codeunit is SingleInstance.
I also have changed from tcps to tcp by registry.
Without the timer ,nas works, only in combination with timer nothing works.0 -
Instead of Timer use CommercePortal Timer
Timer; Automation; 'Navision Timer 1.0'.Timer
CountDown; Automation; 'CP Timer'.cCountDown
Check the Codeunit 6220 MailHandlerRegards
Dan Lindström
NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
MBSP Developer for Microsoft Dynamics NAV 20090 -
Hi danlinstrom: thanks for your hint.
i have found the CP Timer, I created it, but it doesn't work correctly.
New Codeunit, Single Instance:
OnRun():
IF ISCLEAR(CPTimer) THEN
CREATE(CPTimer);
CPTimer.Start(10);
Timer::TimerEvent()
MESSAGE('Clock is %1',TIME);
When i run the CU, there is only one message, no more.
Is the Interval defined in milliseconds?
Can you help me?0 -
One line is missing:
Your code
Timer::TimerEvent()
MESSAGE('Clock is %1',TIME);
New code
Timer::TimerEvent()
intNextInterval := IntervalInSek * 1000;
MESSAGE('Clock is %1',TIME);Regards
Dan Lindström
NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
MBSP Developer for Microsoft Dynamics NAV 20090 -
It works on a ClientPC, not on NAS:
OnRun():
IF ISCLEAR(CPTimer) THEN
CREATE(CPTimer);
IntervalInSek := 10;
CPTimer.Start(IntervalInSek);
CPTimer::CountDown(VAR intNextInterval : Integer)
intNextInterval := IntervalInSek * 1000;
MESSAGE('Clock is %1',TIME);
On Client I get a message every 10 seconds, in the eventlog of NAS nothing. I can't understand, if I would have installed the nas incorrect,
normal operations(without timer) also would'nt work, but the do.0 -
Is the ntimer.dll correctly registerd at the server? Do you have the appropriate rights to use it?0
-
At first i was not sure, if it is. But then i registered the dll manually by
command prompt: regsvr32 "patth...\NTimer.dll", because of this I can exclause this mistake.
After that i run the Codeunit in debug modus first at the client and then with the server.
Client:goes until " CPTimer.Start(IntervalInSek);", then repeats the CountDown-Trigger every 10 second, allright.
Server: goes until "CPTimer.Start(IntervalInSek);" then leaves the CU.
Why?0 -
Now I know what is wrong.
On my server I have installed both NAS and Business Notification Server.
I deinstalled Business Notification Server for a few minutes and the Timer works.
Does anybody know why NAS ist not compatible with Business Notification Server ?0 -
So you are running two instances of NAS. Do you have two of them in your license? You can run as many instances of NAS as you want, but they have to be in your license. The foundation license comes with one instance, and you have to purchase each additional one.0
-
I have only one NAS server and a licensefile is in the correct folder.
Does the Business Notification Server also needs a license file?0 -
One machine is not relevant. What is relevant is that if you have two instances of NAS running, you need two instances of NAS in your license.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions


