Unpublish an App from Business Central Sandbox
We have more Extensions published and installed in our BC Sandbox-environment for extensive testing. The version of one of the apps was unintentionally modified and as a consequence when uploading that App to our sandbox, we got an error, telling that we needed to run an update. We have corrected the version in the app.json file and reloaded the App, but now we get error 422: The Extension can not be synchronized as a newer version has already been synchronized.
However when we open the sandbox, the correct App is there with newest modification and correct version. The App just needs to be installed manually. Then everything works.
The error 422 just keeps coming up every time we upload new modifications for this App.
How can we remove the App totally from the sandbox without removing the entire sandbox ? We have test-data in other App's we would like to keep.
Expected an Unpublish would solve the task but we can't find any guide of unpublishing from the sandbox.
You can unpublish the extension, but I don't think that will fix this error as that won't remove the schema changes.
Try adding this line to the launch.json file in your project and see if this fixes the error: "schemaUpdateMode": "Recreate"
What this will do is remove the schema changes for your existing (higher version) extension prior to publishing your new extension. Note that this will also remove any data from tables and table extension columns that were defined in the extension as well. After you do that once you should be able to remove the setting and still be able to publish without removing data.
If you find that you do want to unpublish an extension in the future, though, that option is available for extensions that were published through VSCode or created with the in-client designer.
- Go to the Extension Management page.
- Find your extension and choose Uninstall.
- After the Uninstall is complete, choose Unpublish.
Thanks, that worked :-) Just wondered about the unpublish. In NAV2018 OnPremise we have the Unpublish function, but that function seems not to be available in D365 BC Cloud sandbox. Maybe it will be there in a future release (?)
We are not planning changes in this area in the near future but will consider it for our long term backlog. Closing this issue as it seems to be solved.