Today i was struggling with the deployment process between Visual Studio Code, NAV On-premise vs. Business Central Cloud.
In the on-premise world of Dynamics NAV the process is easy as you can use Powershell to publish and install extension apps. The other way is to directly publish from Visual Studio Code using AL:publish or shortcut F5 to your local NAV server. What you can’t use is to upload the build .app file using the build process in Visual Studio Code and then Upload the extension app through the Windows Client or Web Client. The action “Upload Extension” is not available any more in Sandbox Environments and also in NAV On-premise since Microsoft has changed the deployment policy.
The question now for me was, how can I publish and install my extension app in the Business Central Cloud Sandbox where you can’t access through Powershell and don’t have the “Upload Extension” action. I’ve found a short video which saved me time figuring this out.
The solution for me was to create a new Sandbox Environment from the Production Business Central Environment so that i am added as SUPER user. This is required (recommended?) to publish extension apps from Visual Studio Code. Next step was to add a new configuration block to my existing launch.json file where I had to define the connection to Microsoft Cloud Sandbox. When I tried to publish I had to authorize with my Microsoft Account, and at least my extension app was published and installed in the Sandbox Environment.
{“name”: “Microsoft cloud sandbox”,“type”: “al”,“request”: “launch”,“startupObjectId”: 22}