Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Business Central Download file to local computer

Posted on by 215

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 ?
Categories:
  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans