X++ code to export the file from AX

static void RB_ExportAs_csvFileCommaIo(Args _args)
{
CommaIo fileOut;
//based on the extension it will export the file from AX .
FileName fileName = "c:\\Customers.csv";
CustTable custTable;
;
#File

fileOut = new CommaIo(filename, #io_write);

if (fileOut)
{
while select custTable
{
fileOut.write(custTable.accountNum,
custTable.name,
custTable.custGroup,
custTable.currency);
}
}
}

No comments:

Post a Comment

D365 F&O Management Reporter Troubleshoot issues opening Report Designer

  Issue 1 - Report Designer doesn't start when you select "New" or "Edit" Resolution Check the Event Viewer:   If th...