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 :
Small and medium business | Business Central, N...
Suggested Answer

Is there a way that I can Save file in a specific folder dynamically

(0) ShareShare
ReportReport
Posted on by 47

I would like to save a file in a specific folder, I used the function

DOWNLOADFROMSTREAM 

But can I make it work without a show popup to the user, making it in the background in a specific folder?

TempFile.CREATEINSTREAM(NewStream);
ToFileName := 'SampleFile.txt';
DOWNLOADFROMSTREAM(NewStream,’ Export’,'', ’ All Files (*.*)|*.*’,ToFileName)

And besides that can I create a Folder with AL

I made some search and I just found that I can only make zipFolder with  

Codeunit "Data Compression"
But this codeunit doesn't exist in older version is there any equivalent for it?
I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,165 Moderator on at

    If you are running BC online you can not decide the file location through AL code. Unless you want to save to Azure blob storage or OneDrive.

    Because the background services have no connection to your client machines / servers.

    If you are onprem you still have some possibilities.

  • Suggested answer
    YUN ZHU Profile Picture
    99,502 Super User 2026 Season 1 on at

    Hi, Inge is right, if you're On-Pre you can do this as in NAV. But it can't be done for the SaaS version. Because the SaaS server can't find your local folder.

    Take another example:

    Report.SaveAsPdf is supported only in Business Central on-premises.

     pastedimage1660868074078v1.png

    pastedimage1660868083441v2.png

    Hope this helps as well.

    Thanks.

    ZHU

  • TAHER El Mehdi Profile Picture
    47 on at

    Yes I do this on-prem, what's some possibilities I have to save in a specific folder, and is it even possible to create a folder?

  • TAHER El Mehdi Profile Picture
    47 on at

    Yes, Inge is right!

    I am not saving file Report to use method SaveAsPdf, I want to save file txt for example in local machine where BC server running or create a folder! is that possible?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,933 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,055 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 640 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans