Hello!
I'd love to have the possibility of reading files that are included in the repository using AL Objects.
For example:
We have built an application that is already published on Microsoft AppSource. We want to provide the best possible user experience, so we want our customers to be able to initialize a whole set of settings with just one click using Assisted Setup. Unfortunately, we have a large number of settings due to the complexity of our processes, which are also subject to complex regulations. As a result, we have a substantial number of configuration settings.
The best option would be to hardcode this data into Codeunits and import it with scripts. While this is a smart solution, it could be simpler and more maintainable.
What if, instead of hardcoding so much data into a Codeunit, we could read a JSON file stored in the repository under a specific relative path?
Why can't we read JSON files stored in the repository when we can read *.rdl files used for report layouts?
Comments
Hi Danis,Thanks for your comment. Yes, we thought about using Azure Blob Storage, but maintaining this solution isn't much easier.First of all - we would need to host it.Second of all - we would need to either make this ABS public (so anyone could run GET method), which is terrible idea or we would have to include the authentication token somewhere in the code, which also isn't great.Anyway, I think that the "Initialization data" is an integral part of the application, so I don't see a problem with updating the version of the application when this data changes.
Category: Development
Hi Maciej,I would not use files in the AppPackage - what if you need to change the configuration? You need a new App Version on the AppSource..Have you thought about using Webservices? So you can change the configuration file content on your server / Azure Storage without no problems.
Category: Development
Business Central Team (administrator)
Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team