Page is not refreshed
Cem_Karaer
Member Posts: 281
Hello,
I use a dotnet variable with events. When a call comes to a client, a page in NAV 2013 should view caller's data (data are found by using caller's phone number). Dotnet variable catches the call, finds the phone number and finds the related customer writes all those to page variables which are shown as fields, but but.. I cannot display the data as soon as the call comes, but when I manually refresh the page (pressing F5 key), all of data are shown.
I could not find anyway to achieve the behavior of pressing F5 in code. Is it possible?
Note: CurrPage.UPDATE doesn't work. The page even does not show any message (MESSAGE command)!
I use a dotnet variable with events. When a call comes to a client, a page in NAV 2013 should view caller's data (data are found by using caller's phone number). Dotnet variable catches the call, finds the phone number and finds the related customer writes all those to page variables which are shown as fields, but but.. I cannot display the data as soon as the call comes, but when I manually refresh the page (pressing F5 key), all of data are shown.
I could not find anyway to achieve the behavior of pressing F5 in code. Is it possible?
Note: CurrPage.UPDATE doesn't work. The page even does not show any message (MESSAGE command)!
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005
Dynamics NAV Developer since 2005
0
Comments
-
Hi,
You have two options.
1. Option
You can use Send keys, as explained in this blog
http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/16/tip-25-update-header-page-from-the-line-page.aspx
2. Option
You can create a time add-on as explained in this blog:
http://blogs.msdn.com/b/freddyk/archive/2009/11/03/timer-events-on-a-page.aspx
I hope this helps.0 -
I preferred the first option, because it seems fairly simple, but unfortunately the following error appeared:
Microsoft Dynamics NAV
Break On Error Message:
This message is for C/AL programmers: The call to member SendKeys failed: Index (zero based) must be greater than or equal to zero and less than the size of the argument list..
OK
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 20050 -
Hi,
Without being able to see the code it is difficult to say what is wrong.
Anyhow when I red the message it looks like you called SendKeys without any parameters, at least that is what the error message says.
See this for more info
http://www.mibuso.com/forum/viewtopic.php?f=5&t=25712
I hope this helps.0 -
The PingPong add-in was included in NAV 2013 for doing these kinds of timed callbacks.
http://msdn.microsoft.com/en-us/library/jj551782(v=nav.71).aspxBest regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410 -
The problem persists. Automation variables cannot be used. Instead of automation I used dotnet variable with the help of following link:
http://www.mibuso.com/forum/viewtopic.php?p=242129#p242129
Here are the patches of the code. The event is triggered when a phone call comes to the client terminal:VoxtronClient70::OnContactTransfer(newContact : DotNet "VoxtronClient.ClientIntegration70_Contact_Interface") CallFunction(newContact.ContactFrom); SystemWindowsFormsSendKeys.SendWait('{F5}'); SystemWindowsFormsSendKeys.SendWait('{F5}');
Global Variable (WithEvents = Yes)
Name DataType Subtype Length
VoxtronClient70 DotNet VoxtronClient.ClientIntegration70.'VoxtronClient70, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ebf42ccfc26401bd'
Local Variable (RunOnClient = Yes)
Name DataType Subtype Length
SystemWindowsFormsSendKeys DotNet System.Windows.Forms.SendKeys.'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
I got the following error:
Microsoft Dynamics NAV
Break On Error Message:
Microsoft Dynamics NAV Application Server attempted to issue a client callback to create a DotNet object: System.Windows.Forms.SendKeys (CodeUnit ... ...). Client callbacks are not supported on Microsoft Dynamics NAV Application Server.
Tamam
Here is the question:
Why are client callbacks not supported on Microsoft Dynamics NAV Application Server?Cem Karaer @ Pargesoft
Dynamics NAV Developer since 20050
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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 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
