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, ...
Suggested Answer

Change Text IO file path to user downloads

(0) ShareShare
ReportReport
Posted on by 384

Dears,

i am using Text IO to create TXT file, but what i want is to set the path to downloads, like the File::sendFileToUser() so the file can be downloaded on the local pc of the D365 user,

kindly provide me with other suggestions in order to achieve the above,

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    If you want something like File::sendFileToUser(), use File::sendFileToUser(). :-) It's up to the user to decide where the file will be stored on his or her local machine. Your code running in Azure data center can't access that.

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    Users can set a default download folder in their browser settings, D365 can't control it. 

  • sylvesterPowerBi Profile Picture
    384 on at

    Since we are using on=prem environment, the temp file is being located always on AOS1, thats why i want it  to be downloaded on user side and not on  AOS

  • Suggested answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    I'm not sure if I understand your latest reply. But also in on-prem the system just offers the file to the browser for download. The system can't control what the browser does with it. The user of the browser does that.

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    why don't you make use of DIXF for downloads of any data. It will simply prepare the file and your user can get it on their local hard drive..?

  • sylvesterPowerBi Profile Picture
    384 on at

    can you provide me with some links to do that ?

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Before I do that, it would helpful to know, what sort of data it is. Does it involves single or multiple tables. Is the data coming from Standard tables or customized tables? or is it combination of both types of tables? Is it related to sales purchase GL, inventory or any other context of system?

  • sylvesterPowerBi Profile Picture
    384 on at

    Hi ,

    the data is coming from combination of both types of tables,related to payroll

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    Thank you for providing this information. Create a data entity that should cater and include all those tables from where the information is coming. Get rid of old frameworks that cause pain in longer run. I am providing you here few links to read and work on the subject.

    docs.microsoft.com/.../data-entities

    docs.microsoft.com/.../build-consuming-data-entities

    Once you will have a data entity, you can export or import data using it.

    Get back to us, if you will have any more questions.

  • sylvesterPowerBi Profile Picture
    384 on at

    Hi

    I managed to fixe it other ways , i don't want to use data entity since i need the TXT file to be formatted based on the given template

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
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans