I saw different tickets and questions related to the title’s topic in the last weeks and I think there’s the need for a clarification. I wrote a post some months ago by explaining the Dynamics 365 Business Central SaaS tenant upgrade process that Microsoft has in place (you can find it here) but there are some strange behaviours that start appear to partners and that must be explained.
As you already know for sure, With Dynamics 365 Business Central SaaS customers and partners have now also the possibility to create a sandbox environment by copying also the production data and it’s quite natural that the Sandbox environment itself is becoming a “testing area” for different extensions (I think it’s the nature of a sandbox environment, isn’t it?).
After this introduction, now here is the problem: Microsoft is automatically performing tenant upgrades (CU1, CU2, CU3 and so on) and after these upgrades many customers had a sandbox with all their extensions disappeared, while the production environment was correctly ready to go with all the previously installed extensions (no interruptions).
Before the tenant upgrade we had the following situations:
After the tenant upgrade, we have the following situation:
Why this?? Is it a bug? No!
There’s an “hidden” behaviour (recently explained internally by Microsoft) that occours when you publish an extension in a sandbox environment in comparison to publishing the same extension in a production environment.
If you publish an extension in a sandbox environment, this extensions is published within the scope of the service node that is hosting the sandbox. When Microsoft upgrades the tenant to a new version (CU) the sandbox environment is “moved” to another service node running the new application version. Before this shift, the extensions from the original sandbox are unpublished because that extensions will not be available on the new service node.
Saying that, can you see the second image above? There’s also a round box called DATA. Data of every extensions in the sandbox is preserved during the “shift”, so you need only to publish and install again the extensions you need and magically their data will be available again in your upgraded sandbox environment.
In a production environment, the behaviour is different. When you publish an extension in a production environment the extensions are published withing a global scope. During a tenant upgrade, that extensions are automatically downloaded and installed to the production tenant (service node) and they will never disappear to the end user.
I agree that this is a noisy behaviour, expecially if you’re running test applications in the sandbox environment, but that is at the moment…
I remember that you can control the tenant upgrade window via the Business Central Admin Center:
and I think it could be interesting to have here also the possibility to set a “date window” for upgrades (please don’t upgrade my tenant from day X to day Y). This is planned for the April 2019 Wave.
Last answer to a question received: Actually you don’t have a notification (in advance) when your tenant will be upgraded to the last CU (Microsoft will not write to you saying that “your tenant will be upgraded at day X”). This will be useful to have I think.
UPDATE 2019-01-28: Microsoft has updated the Choosing your development Sandbox Environment page on Docs with the notes signaled in this post. Great work!