Hello!
I have written this code (in the OnAction trigger for a page action) to call a xml-port and import some data to a table. After selecting the file in the dialog box I get an error message saying "Could not find a part of the path 'C:\....". I have tried locating the file on the client computer and on the server but with no difference in result.
ImpFile.OPEN(FileMgt.OpenFileDialog('NAV File Browser','*.xml',''));
ImpFile.CREATEINSTREAM(Stream);
AvtImport.SETSOURCE(Stream);
AvtImport.IMPORT;
ImpFile.CLOSE;
Any suggestions in how to get it to work?
0
Answers
Remember also that "C:\...\..." is on the server where the NAV server is and not on the machine where the client is.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
1. Permission should be there.
2. The path do exist
3. If Client and server are not same. If its not same then you should make sure to copy the file to your current machine so that it can access to it. Actually this was my case. I was using One Click.
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
My case is also the 3rd one which I just discovered. How did you copy file from client to server? Which standard functions did you use?
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter
https://blogs.msdn.microsoft.com/nav/2013/08/09/nav-pattern-of-the-week-silent-file-upload-and-download/
Ishwar Sharma
My Blogs: Dynamics Community Blog | Blogspot
Connect: Google + | Twitter