Navision Timer

ara3n
Member Posts: 9,258
Navision Timer 1.0
Hello I read in the following topic
http://www.mibuso.org/forum/viewtopic.p ... highlight=
about being able to catch the navision erros using The timer automation with the event TimerError.
Here is my code. TempCU suppose to basically just errors out every time.
What I expect from this is that TimerError Event would tigger and message would show me the ErrorString. Unfortunately it doesn't work.
What am I doing wrong? Has anybody tried this?
Thanks in advance.
Hello I read in the following topic
http://www.mibuso.org/forum/viewtopic.p ... highlight=
about being able to catch the navision erros using The timer automation with the event TimerError.
Here is my code. TempCU suppose to basically just errors out every time.
IF ISCLEAR(MyTimer) THEN CREATE(MyTimer); MyTimer.Interval := 1000; MyTimer.Enabled := TRUE; MyTimer::Timer(Milliseconds : Integer) if TempCU.RUN then; MyTimer::TimerError(ErrorString : Text[1024]) MESSAGE(ErrorString);
What I expect from this is that TimerError Event would tigger and message would show me the ErrorString. Unfortunately it doesn't work.
What am I doing wrong? Has anybody tried this?
Thanks in advance.
0
Comments
-
Just do TempCU.RUN. Get rid of the "IF ... THEN" as this syntax causes Navision to return a Boolean resault rather than throwing the error.0
-
My whole point is to run with if TempCU.RUN then. And if there are any errors, still continue and be able to get the error through the TimerError Event.0
-
I would guess the error can only be logged if the error occurs in the same object as where the OnTimer-event is used.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
If the error is within the codeunit, then you can't use if codeunit.run. and the error would terminate the code you are running.0
-
Well that would happen anyway. The point of using that timer error event is to see if you can catch the error description, to maybe log the error messages in a special table. Using IF Codeunit.RUN prevents the calling transaction from aborting, and finish a transaction assuming that an error was raised.
Two different things for two different purposes.0 -
As far as I know this only works when running from NAS.
when run interactively the ErrorDialog will popup prior to triggering the TimerErrorEvent.
](*,)Peter Wijntjes
MBS NAV Consultant0
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