Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

BC16 (AL - Cloud) "File Management" Import method without "DialogCaption

Posted on by 5

Hello everyone!  

We are currently converting our solution from BC14 (C/AL - on premise) to BC16 (AL - Cloud).
During this process we have come across some commands, methods etc. that do not work in the cloud. 

I am looking for a video or documentation that describes how to search, open and read several text files in a directory in the background. 

Does anyone know any video or documentation for it? 

Unfortunately BC16 does not accept internal methods of "File Management" like "GetClientDirectoryFilesList" or for file fields the Open command (FileF.Open(PathFile)). Unfortunately I can't find any documentation how to handle files in the cloud. 

It would be nice if there was something "official" from Microsoft.  

The user must not be asked interactively to select the file!  

We need a fully automated variant that processes the files via the task queue (for example). Of course, the question arises as to which files or file system the cloud has access to at all.

 Example: There are monthly (20-50) external text files with different file extensions (*.??| *.??) with price, quantities, information, etc. as an update for certain products or new products or products that need to be deleted.  

These delivered files are unpacked into a directory. These files must then be able to be processed using a list page. This should be done in a kind of batch processing, so that the user does not have to select each file individually

 We have now done the opening with BlobImport. But unfortunately "BLOBImport" works with the "DialogCaption". We cannot use that. 

Is there an import method without "DialogCaption"?

 

Many thanks

Best wishes

Conchi

  • RE: BC16 (AL - Cloud) "File Management" Import method without "DialogCaption

    Thank you so much! Unfortunately, we only have the way to go via Azure! We wanted to avoid that.

    Best wishes!

    Conchi

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: BC16 (AL - Cloud) "File Management" Import method without "DialogCaption

    In the cloud files are a different thing. You don’t have a file system. You can upload a file from client or a zip package and unpack it server side. Or (if you want to have a real file system in the cloud) use something like Azure Blob Storage where you can download multiple files with a simple GET http call.

  • RE: BC16 (AL - Cloud) "File Management" Import method without "DialogCaption

    Thanks butWe have to make cloud and the files should at least be selectable. Not just every single file. You can open and process the files without any problems. But only every single one. And you cannot expect the user to select a file 100 times.

  • Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: BC16 (AL - Cloud) "File Management" Import method without "DialogCaption

    If you target the onpremise environment (target = onprem in app.json) you can use the same methods for Files as in C/AL. On SaaS, you don't have a file system so you cannot browse a directory. You can upload a file from client (UploadIntoStream) or download it from an online storage.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans