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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Download a File to a specific folder

(0) ShareShare
ReportReport
Posted on by 779

With the web client, The function DownloadFromStream doest allow to specify the client folder where to save the file. Every file is saved to the browser default transfer folder.

In my scenario I want to save a txt file to a pre configured folder.

TempFile.CREATETEMPFILE();

TempFile.WRITE('abc');

TempFile.CREATEINSTREAM(NewStream);

DOWNLOADFROMSTREAM(NewStream,'','MyFolderPath','',MyFileName)

Whats the correct approach to apply on WebClient?

Categories:
I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,300 Super User 2026 Season 1 on at

    There is no way to download to a specific folder because you are using web browser. It is restricted to the browser default download. You will probably need to go to other languages, such as JavaScript, to accomplish this.

  • Suggested answer
    jcastro Profile Picture
    2,245 on at

    The only way I can think of consists of placing it onto a folder that both the server and the user can access, so like a shared folder. If that was the case, you could create the file server-side and then have the user go to it using that shared folder. Of course other sharing solutions could apply, like FTP p.e.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans