Hi, good afternoon
I am new in the world navision and I have question's
My buddie has me asked creating a file txt from navision but the example shared is a txt with algoritm
what is the most recommended way to do this process?
best regards,
Javier.
0
Answers
you should do a xmlport, it allows also to create CSV files.(format=variable text). is that what you are looking for?
I have solved this issue, for this I have written this code, in case someone is interested
FileName := 'C:\MyRuta\MyFile.txt';
CLEAR (OUTFILE);
OutFile.TEXTMODE := TRUE;
OutFile.WRITEMODE := TRUE;
OutFile.CREATE (FileName);
OutFile.CREATEOUTSTREAM(OutFileStream);
OutFile.CLOSE;
FileManagement.DownloadToFile(FileName,FileName);
he declares the local variables to be able to instantiate them in the code;
FileName with a DataType: text, OutFile with a DataType: File, OutFileStream with a DataType: OutStream and FileManagement with a DataType: Codeunit and select FileManagement.