How to work with File Management on Business Central (AL)?

elushkaelushka Posts: 7Member
On NAV 2017 i used a dotnet variable (System.IO.Path, ect) to handle the file management. For example to upload a new file, to download ect... Now i upgraded the code to AL but this does not work for the web client not for windows. For the windows client i used this: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-get-started-call-dotnet-from-al

Is there any possibility to do that on AL code?

Thanks :smile:

Best Answer

Answers

  • wolfskinwolfskin Posts: 62Member
    You can use in and out stream types.

    May this blog will help you. <<https://navbitsbytes.com/2017/12/08/al-extensions-importing-and-exporting-media-sets/>>;
  • RobyRRobyR ItalyPosts: 39Member
    If you are in a onPremise solution, then you can set the target "Internal" and then you will be able to use FileManagement, otherwise follow @wolfskin solution
  • elushkaelushka Posts: 7Member
    Thanks @wolfskin . But i want that the document saved to a path on server (ex: "C:/Documents/...". As i saw at your blog this saved a record to table. Is there any other possibility to do that?
Sign In or Register to comment.