In this example I will show how to read the server settings directly from NAV code. Without the need to know the location of the config file or to create an external .Net dll. Also PowerShell isn’t needed, and you don’t need any information about the running environment. Only the tenant ID is important in case you are running in a multitenant environment, but the tenant ID is already available in C/AL code with the TENANTID key word.
Posted inDynamics NAV & BC Tips & tricks