You all know the designer, right? The tool for developers (aka the “in-client visual designer”) that “provides an easy and convenient way of making immediate adjustments to your design by simply dragging and dropping the components on the page”.
Well .. then you probably know there are things to take into account…
It actually all comes down to what I call “the worst button in NAV ever created in history of mankind”. The “Design” button:
Whoever uses that button, is actually doomed in any kind of scenario. What happens is: you open design mode without any context of “active extension” – which basically means – it will create a new extension. And if you – after designing – save that extension, another invocation of the button will create yet another extension. Extensions after extension .. and your environment gets messier and messier.
Ok – I admit – it would just be a sandbox database (in SaaS, this button is only enabled when you opened a sandbox (but what about OnPrem??)) but still, I don’t see any use case to use this designer other than you would design pages for YOUR extension, meaning you would open the Designer from VSCode by “AL: Publish and open in the designer” (or “F6” if you will):
When you would do that, you ARE actually giving a context to the Designer (being your currently published extension), which means it will save all the changes you would do, into that extension for you to be able to download to your extension again (with F7 (Download Source code)).
So, the Designer is good – the button is “evil” (yeah, probably exaggerated a bit, but you get my point ;-)). Now, on SaaS, you don’t have to worry that much. OnPrem, my recommendation would be that you actively make sure, this button does NOT exist in a live environment.
When I was searching for how to do this, the only thing that I could find was this on Docs:
Now, I knew of the fact we could also hide the “Personalize” button (which is on the same place in the client) by simply edit the navsettings.json. There is actually a very helpful page on Docs that explains what you can configure for your web client: https://docs.microsoft.com/pt-pt/dynamics365/business-central/dev-itpro/administration/configure-web-server . And while I expected the same kind of setting as this personalization, this document doesn’t say anything about how to hide the designer, or any kind of setting in that same file, that handles visibility of that button.
Luckily, I have smart colleagues, who found out that there actually IS as setting, in that navsettings.json, that actually handles this:
One thing though:
By editing the file directly, it would work, but only after some services that would have been restarted (I restarted the entire docker container). But if you would use PowerShell like this:
Set-NAVWebServerInstanceConfiguration -WebServerInstance NAV -KeyName Designer -KeyValue false
It works instantaneously
Do know though, when you decide to remove this, you can’t open the designer from VSCode either.. .