Handling files with AL
Working with files is one of the tricky points with Dynamics 365 Business Central. While in the on-premises version you have full access to your local resources and to a file system, in the SaaS version of Dynamics 365 Business Central things change. Here, you don’t have a file system and you don’t have access to local resources (all runs in Microsoft’s datacenters).If you create a procedure in AL, you declare a File variable and then you invoke one of the common file management methods (like for example the Create method that creates and opens an ASCII or binary file), this is the error that Visual Studio Code prompts you:
This error occurs because the extension you’re trying to create targets as default the Dynamics 365 Business Central SaaS environment ("target": "Extension"
in app.json file).If you add "target": "Internal"
to your app.json file (in this way you’re declaring that your...