Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
how can i get the current database name and server name in my c/al code?
try these posts
tables 2000000047 to get server and 2000000048 to get the Database name is the answer. thx.
unfortunately does not work for nav 2013.
it's done by the WSH (Windows Scripting Host).
- "wshNetworkInfo", Type: Automation, Subtype: 'Windows Script Host Object Model'.WshNetwork
- "compName", Type: Text
compName := wshNetworkInfo.ComputerName;
properties of class WshNetwork:
for nav 5.0 function ENVIRON('COMPUTERNAME') works fine.
For Dynamics NAV and Al development you can use the Active Session tabel. See function GetDatabaseIndicatorText in table 79:
ActiveSession.SETRANGE("Server Instance ID",SERVICEINSTANCEID);
Text := ActiveSession."Database Name" + ' - ' + ActiveSession."Server Computer Name";
Business Applications communities