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.
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
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