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)!
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005
0
Comments
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.
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
Dynamics NAV Developer since 2005
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.
http://msdn.microsoft.com/en-us/library/jj551782(v=nav.71).aspx
Johannes Sebastian
MB7-840,MB7-841
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:
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?
Dynamics NAV Developer since 2005