Realtime page updates from codeunit

kevindstanley
Member Posts: 11
Hi,
I have a codeunit that is exposed as a webservice that gets update periodically, but event-driven, it could be every second or sometimes every half hour depending on the time of day.
This is the scenario I have.
-Codeunit updates TableA
-3 users are looking at PageA(that uses data from TableA)
-3 users are looking at stale data
Is there a way for the data that the 3 users are currently looking at update in an event driven fashion, meaning as to not use timers and have the codeunit tell the pages to updates.
Thanks!
Kevin
I have a codeunit that is exposed as a webservice that gets update periodically, but event-driven, it could be every second or sometimes every half hour depending on the time of day.
This is the scenario I have.
-Codeunit updates TableA
-3 users are looking at PageA(that uses data from TableA)
-3 users are looking at stale data
Is there a way for the data that the 3 users are currently looking at update in an event driven fashion, meaning as to not use timers and have the codeunit tell the pages to updates.
Thanks!
Kevin
0
Comments
-
here is an update on my research.
Would it be possible to create a dotnet client Add-In that uses Microsoft's new SignalR library to subscribe(listen) to a server for changes, and when there are changes fire the RaiseControlAddInEvent in the Add-In to run some C/AL code (CurrPage.UPDATE) inside of the C/AL's Add-In .
With signalR, every client that is connected receives messages from a 'server' broadcast. I would just write the server to use localhost:port and point all of the clients to that servers ip:port to listen.
I have done some work with signalR in the past, i don't know how well Nav plays with Async dotnet though... or if it would work with this library at all.
If I have time to write up a demo I will post my findings. Let me know if anyone has tried something like this.0 -
You don't need signal IR. You can use simple socket and connect to a server. sending and receiving Asynchronously. There is MSDN example available for a server and client.
And yes you can do it through Addin.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