File does not exist on NAV-server

Hi,

I have made a codeunit that can import a csv file. It works fine on the NAV-server, when I select a file from C-drive. When I run NAV on the terminal server and select a file from C-drive, I get the message "The file C:\Temp\myFile.csv was not found".

It looks like I need to specify that my codeunit must be run on the client, but how do I do that?

My codeunit OnRun trigger starts with this:

fileName := FileMgt.OpenFileDialog('choose file','','CSV files|*.csv|All files|*.*');

IF fileName = '' THEN EXIT;

CLEAR(myFile);
myFile.OPEN(fileName, TEXTENCODING::UTF8);
myFile.CREATEINSTREAM(inStream);

Best Answer

Answers

  • MortenSteengaardMortenSteengaard Posts: 22Member
    Thanks, SanderDk!!
Sign In or Register to comment.