Timer in RoleTailored Client

YuriM
Member Posts: 12
Hi,
is there still any possibility to use a Timer (built-in or as an automation object) in the RoleTailored Client?
We have one solution (NAV 5.0 SP1) that uses Timer (Automation object) for regular checking whether there are any new data in a table. We want to port this solution to NAV 2009. In the Classic Client (SQL) everything works fine, but in the RoleTailored Client we don't get any events from Timer.
Any ideas how to work it around?
is there still any possibility to use a Timer (built-in or as an automation object) in the RoleTailored Client?
We have one solution (NAV 5.0 SP1) that uses Timer (Automation object) for regular checking whether there are any new data in a table. We want to port this solution to NAV 2009. In the Classic Client (SQL) everything works fine, but in the RoleTailored Client we don't get any events from Timer.
Any ideas how to work it around?
0
Comments
-
YuriM wrote:Hi,
Any ideas how to work it around?_-========-_
GreenSmile0 -
Thanks, but OnGlobalInsert works only for the current instance of the Client. It doesn't tell if another user has added a record into the table. And anyway it doesn't work with INSERT(TRUE) - it works only when a user presses F3 and creates a new record.0
-
I think they removed event handling from automation. The timer object itself would exist, and it would run, but NAV would not be able to catch the events.0
-
-
I've just created a codeunit with NavTimer (WithEvents) like this:
OnRun() CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Customer); CommentLine.SETRANGE("No.",'10000'); CommentLine.DELETEALL; CREATE(NavTimer); NavTimer.Interval := 5000; NavTimer.Enabled := TRUE; NavTimer::Timer(Milliseconds : Integer) LineNo := LineNo + 10000; CommentLine.INIT; CommentLine."Table Name" := CommentLine."Table Name"::Customer; CommentLine."No." := '10000'; CommentLine."Line No." := LineNo; CommentLine.Date := TODAY; CommentLine.Comment := FORMAT(LineNo); CommentLine.INSERT; NavTimer::TimerError(ErrorString : Text[1024])[/b]
Set SingleInstance to Yes and added a call to this codeunit to an action on a page.
Now when I click on that action in RTC - I get the CommentLine table filled in with comments just fine.
Conclusion - events do work on RTC, just make sure you don't write any code that interacts with user from the event triggers (e.g. MESSAGE('I am working!!') or FORM.RUN(5052)) - this will shut down the events.0 -
But I assume that it will not "run" forever (depends on settings). After time entered in ClientReconnectPeriod if the RTC will not communicate with the NST, the "connection" can be disposed and the instance will be closed. But it is just my assuming.0
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