Hi,
we are looking at updating our NAV addin for NAV2009. Part of our integration allows you to use NAV to view files stored outside of NAV. A text file for example stored in a shared network folder. From the classic client we use a custom COM automation component to launch the correct application to view files when requested by the user. This does not work in the RT client as the COM component is running on the server and not client side.
So, is there any way to launch an application client side from the Role tailored client. I see that the links dialog does this but we cannot access the code in that page as it is hidden..
Anyone got any ideas???
Oh ya, SHELL is obsolete for the RT client so that doesn't work.
B
Comments
RIS Plus, LLC
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Here is some sample code for anyone wondering:
Locals:
Name DataType Subtype Length
Vbs OCX ScriptControl Object
code1 Text 250
txtCR Text 30
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
So far I have registered my OCX however I can't see my OCX functions. Has anyone ever written a custom OCX to call function on from NAV? If so any tips on getting NAV to see the functions?
Cheers
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
If you wish to create an automation object that is goind to run on the client machine, you must use the method that takes tree arguments. Where the last argument determines where the automaiton object will be created. True = Client and False = Server.
Create(someAutomationVariable,True/False(New Server),True/False (Run on Client));
From you example above it's automation variable not OCX!!!!!
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Automation variables can be instantiated on the Client Tier with the CREATE statement, setting the third paramter to TRUE.
OCX'es will demand load on the Client Tier always (there is an implicit CREATE done the first time you use the variable of type OCX)
You only need to install the Automation object (DLL) or the OCX on the tier on which they will run - but note, that when you import .fob's and when you enable the NAV Server and other things - we need to compile all objects and during this compile process - the automation objects and the OCX'es needs to be present to do a successful compile.
If the objects are not present, compile will fail and you will have to go to a machine which has the object to do the compile.
/Freddy
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
If all it takes is an extra undocumented parameter then I've been merrily wasting my time writing an OCX. Perhaps Microsoft should have considered this before telling everyone to refactor their code to run Automation server side. :x
B
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
/Freddy
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
i.e.: If i call the 'c:\windows\system32\notepad.exe' as filepath, there is no problem but if i call it with 'c:\windows\system32\notepad.exe 1.txt' (open the 1.txt file in notepad) nothing happens.