Tip #18 – NAV 2009 RTC – Which database am I logged into


This Blog Article was brought forward from my old blog

We al know this blog entry of Waldo. It shows you how you can see what database you are logged onto.

Now with the Role Tailored Client we have the same issue. All these years of R&D at Microsoft and no one had a brigt moment of implementing this. Stick out tongue

Off course you can see the companyname very clear. But you also want to see if you are in the testdatabase or production.

Now how did I implement this.

Step 1 – Create a new page

We create a new page. Do not use the wizard and do not choose a sourcetable.

Make sure your page looks like this.

Step 2 – Declare global variables

This page needs two variables, one Text and one record of type 2000000048.

Step 3 – The C/AL Code

Our page needs a little piece of C/AL code

As you see we take in account that not everyone has permissions to see the Database table. A user will get a message when he/she has no permission.

Step 4 – The Text Constant

Step 5 – The Page Properties

Step 6 – Coloring Cool

The coloring is done in the properties of the Databasename field.

Step 7 – Add the page to a role center

To make it work you need to add the page to each role center that needs this functionality

I  our case this is rolecenter 9006

And that’s it.

Off course you can also add all the stuff from Eric’s blog as well.

Enjoy

Download the page including this information here

Advertisements
This entry was posted in Tips and Tricks. Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s