Today I wanted to get some basic information about my NAV2018 service and database name in my extension. A quick Google found a lot of useful stuff about this but nothing that was easy enough for me. I really did not want to go messing about with xml or dotNET. This is basic stuff right? There has to be a simple way. And then my eye was drawn to my system indicator, what I want is right there on the screen.

So I started having a look in table 79, Company Information, and there was the gem I needed:

ActiveSessions

But can I use it in VS Code? Well, it turn out that you can:

ActiveSession-AL

So, for me the Active Session table works perfectly. It does not show you the database server though.

ActiveSession

Many thanks to the people who wrote about this before me:

https://www.kauffmann.nl/2015/04/07/read-server-settings-from-cal-code/
https://community.dynamics.com/nav/f/34/p/141286/831849#831849
http://www.dynamics.is/?p=541

About the Author René Brummel

My driving force is the will to learn. Every day brings its unique challenges, my goal is to rise to each challenge and learn from it. My professional expertise is the streamlining and optimization of business processes. My experience ranges from software development (I know AL, C/AL, C#, .NET, Visual Basic etc) and implementation to business processes optimization, project management, training, and coaching. At the heart of what I do lies my vision, “sustainable change comes from conscious choice, made out of free will”. In my spare time I am a member of Bikers Against Child Abuse. B.A.C.A. helps abused children to no longer be afraid of the world in which they live.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s