File Class D365/AX7 CSV Export X++

Hello DAX DEV,
Here’s a simple class doing a CSV file Construction and Export in Dynamics 365
The EDTs FilePath, FileNameSave, FileNameOpen are Obsolete in AX7, So creating dialog fields to manage the file info is no longer an option.

There is a new class called File to replace file handling.

unnamed1
unnamed2
unnamed3

This is the whole code exporting custInvoice Info to a CSV.

Notice how easy is it to send the file to the User
Line 46: File::SendStringAsFileToUser(str _csvFileContent, str _filename);

Follow us and get exclusive AX DEV content weekly