AX 2012 X++ Export cross company vendor emails
static void AllSupplierEmailExport(Args _args) { Dialog dialog = new Dialog(); DialogField dialogField; AsciiIo exportFile; str filePath, fileNameOnly; filetype type; str delimiter = ";"; int totalRecords; VendTable vendTableAll; VendTable vendTable; container line; dialogField = dialog.addField(extendedTypeStr(FilenameSave), "Select File", "Select file to export"); dialog.caption("Extracting Vendor Remit To details"); dialog.filenameLookupFilter(['csv','*.csv']); setPrefix(dialog.caption()); if(!dialog.run()) { warning("Dialog closed."); return; } startLengthyOperation(); [filePath, fileNameOnly, type] = fileNameSplit(dialogField.value()); exportFile = new AsciiIo(dialo