web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Environment name through code

(1) ShareShare
ReportReport
Posted on by 39
I want to know environment name through code in business central. For instance we create a page with action button /Environment Name/. Upon clicking the button we get a message /This is sandbox environment/. 
I have the same question (0)
  • Suggested answer
    Judy Profile Picture
    Microsoft Employee on at
  • Gerardo Rentería García Profile Picture
    25,154 Most Valuable Professional on at
  • Verified answer
    Nitin Verma Profile Picture
    21,698 Moderator on at
    Hi,
     
    You can try this
     
    var
            EnvironmentInformation: Codeunit "Environment Information";
        begin
            Message(EnvironmentInformation.GetEnvironmentName());
        end;
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans