I use this quite often. When I want a quick job to import a text file. static void ImportFileWithDialog(Args _args) { AsciiIO asciiIO; Filename filename; NoYesId skipFirstLine; Container line; Dialog dialog; DialogField dialogFileName, dialogSkipFirstLine; ; dialog = new Dialog("Import file"); dialogFileName = dialog.addField(typeid(Filenameopen), "File name"); dialogSkipFirstLine = dialog.addField(typeid(NoYesId), "Skip first line"); dialog.run(); if (dialog.run()) { filename = dialogFileName.value(); skipFirstLine = dialogSkipFirstLine.value(); } asciiIO = new AsciiIO(filename, 'R'); if (!asciiIO || asciiIO.status() != IO_Status::Ok ) { throw error (strfmt("@SYS19312",filename)); } ttsbegin; asciiIO.inRecordDelimiter('\r\n'); asciiIO.inFieldDelimiter(',')...
All things Microsoft Dynamics 365 Finance and Operations