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

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Business Central Download file to local computer

(1) ShareShare
ReportReport
Posted on by 231

Hello there.

Using BC 18.

I have a report that creates a file.

The file that gets created gets saved in the server that is running the service.

I want this file to save to the local computer.

Here is my code.

The 3 lines of code below create the file on the server's C -->Temp Drive.

OutputFileName:='C:\Temp\Test.txt';

OutputFile.CREATE(OutputFileName);

OutputFile.CREATEOUTSTREAM(OuputStream);
I am using the following to move the above file to the local workstation C drive.
C419.DownloadHandler(OutputFileName, '', 'C:\Temp', '', 'Test.txt').
The downloadHandler function moves the file to the downloads folder.

What am I doing wrong ? I need the file to go to the local computer running the Web client C->Temp Drive.
Ideas ?
I have the same question (0)
  • Muhammad Israr Profile Picture
    18 on at
    Business Central Download file to local computer
    Hello,

    Did you receive the answer to this question?
  • Suggested answer
    Marco Mels Profile Picture
    on at
    RE: Business Central Download file to local computer

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,678 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,635

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,210

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans