During our Extension Development workshops for Dynamics 365 Business Central, some developers are start asking for scenarios where in my extension I need to detect if it’s running on a Sandbox environment or in a production one.
From an extension, you can detect if it’s running on a Sandbox environment by using the Tenant Management codeunit (417). This codeunit provides a set of…