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

Announcements

News and Announcements icon
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 46
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
    27,553 Most Valuable Professional on at
  • Verified answer
    Nitin Verma Profile Picture
    21,812 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 580 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 480 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 261 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans