Skip to main content

Notifications

Announcements

No record found.

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

create ZIP archive and insert file from server temp folder to ZIP archive and save it in server temp folder

Posted on by 431

Hi All,

I need a solution to create ZIP file, but I am stucked a little. I can create a ZIP archive, but I do not want to download it to local client, instead I need to save ZIP file on servers' temp folder.

I have created a function to save a PDF file on server temp folder, rename the file and upload the file to the FTP. Everything work as expected. Now, I jave to create a ZIP file, insert PDF file to that ZIP file and save the ZIP file on servers' temp folder, by not downloading ZIP file to local client.

Any suggestions? I can also use .net for this purpose, since client has BC deployed on-prem (v19).

Thanks Damjan

  • Suggested answer
    Damjan Zakojc Profile Picture
    Damjan Zakojc 431 on at
    create ZIP archive and insert file from server temp folder to ZIP archive and save it in server temp folder
    I have developed custom solution using codunit FileManagment and WinSCP application where procedure first prints a report into the PDF file and add it into the tempblob, creates a ZIP archive, adds PDF file from tempblob into the created ZIP archive, then a TXT file is created and each PDF file is inserted as new line in that TXT file, then the procedure closes TXT file and also the ZIP archive; saves ZIP archive in the TEMP folder of the BCST server and uploads ZIP file from temp folder and TXT file to the folder on SFTP server.

    Thanks
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: create ZIP archive and insert file from server temp folder to ZIP archive and save it in server temp folder

    Hi, If it is the v19 on-pre version, the previous ways in nav should work. I hope the following information can give you some hints.

    https://forum.mibuso.com/discussion/69651/nav2016-nas-copy-read-file-from-network-drive

    https://forum.mibuso.com/discussion/72477/saveaspdf-on-network-drive

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: create ZIP archive and insert file from server temp folder to ZIP archive and save it in server temp folder

    Hi,

    You can try to save the file directly with Azure function using Blob storage.

    www.navwithnav.com/.../

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans