web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to download the file from D365FO

(0) ShareShare
ReportReport
Posted on by 570

Hi All

 

Environment: D365fo

Requirement: download the CSV file format data from D365FO

 For testing purpose, I use below code to get the data from ax to CSV file its working good on DEV server.

 

Problem: while using out side the DEV server(i.e) development server how to download the  file without any path   

Please share any code to resolve this.

 

   fileName    =  @"C:DataFolder\_AWS_Data_Export.csv";

        io = new CommaIo(strFmt("%1", filename), 'W');

        io.outFieldDelimiter(",");

        io.outRecordDelimiter('\r\n');

            io.write('MainAccountr','BusinessUnit','Event','AccountingCurrencyAmount','Description','TransDate');

 

        while select * from aws_Table

        {

 

            io.write(aws_Table.MainAccount,aws_Table.BusinessUnit,aws_Table.Event,aws_Table.AccountingCurrencyAmount,aws_Table.Description,aws_Table.TransDate);

        }

I have the same question (0)
  • Verified answer
    Satish Panwar Profile Picture
    14,671 Moderator on at

    Hi Tony,

    Assuming this is cloud implementation, you can do as mentioned in link below:

    dynamics365foroperation.blogspot.com/.../create-csv-file-and-save-it.html

  • Satish Panwar Profile Picture
    14,671 Moderator on at

    Moved to D365 Forum.

  • TonyAx Profile Picture
    570 on at

    Thanks for reply .I followed your link in that am facing some error please check blow image.

    Error is  : System.Io.StreamReader is not denote class or table

    4101.Capture.PNG

  • TonyAx Profile Picture
    570 on at

    Hi Satish,

    Its working thanks,you solve my problem

  • mstrillian79 Profile Picture
    2 on at

    I'm getting this same error "System.IO.StreamReader does not denote a class or table"

    What did you do to fix?

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Tony spelled it incorrectly - it's StreamReader, not streamReader. .NET Interop is case-sensitive.

    I can't comment on your own problem, because you didn't provide any details.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans