Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 17314

Export data to CSV file

$
0
0

Following code can be used to export data from Ax to a CSV file

#FileCommaTextIo
commaTextIo;
FileIOPermission permission;
CustTable custTable;
str fileName = @”C:\test.csv”;

permission = new FileIOPermission(fileName,#io_write);
permission.assert();

commaTextIo = new CommaTextIo(fileName,#io_write);
while select custTable
{
commaTextIo.write(custTable.AccountNum,custTable.Name);
}

CodeAccessPermission::revertAssert();



Viewing all articles
Browse latest Browse all 17314

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>