Hi everyone,
I'm using nav 2016 and I need to export some purchase lines to a text file.
At the moment I know how to create the file, download to the client but how to get the specific lines this image show below? I have a page (purcha quote) where I have a page part called "PurchLines" linked to Purchase Quote Subform in PagePartId.

At the moment I have this code
TXT - OnAction()
// LACPOS001
MESSAGE('WORD');
Serverfilename := FileManagement.ServerTempFileName('txt');
ClientFilePath := 'C:\teste.txt';
MyFile.CREATE(Serverfilename);
MyFile.CREATEOUTSTREAM(MyOutStream);
IF PurchaseLine.Find('-') THEN
REPEAT
counter := counter+1;
//MyOutStream.WRITETEXT('9525200001 22-08-18 0 1,1');
//MyOutStream.WRITETEXT(); // This command is to move to next line
UNTIL PurchaseLine.Next = 0;
//MyOutStream.WRITETEXT('9525200001 22-08-18 0 1,1');
MyFile.CLOSE;// To end the writing and write out to the file.
FileManagement.DownloadToFile(Serverfilename,ClientFilePath);
*This post is locked for comments
I have the same question (0)