Retrieving Server Name field in C/AL

Hi, does any one know how to retreive the “Server Name” field so I can display them on the main menu form, so I can differentiate easily between live/test databases?

Directly AFAIK no, but please do a search for other options to differentiate.

The databases are identical, even the file names are the same as I simply do a restore of the live system to the backup/test systems on separate servers. I guess I could simply add a field into the database that I could update each time I “refresh” the db, but I am trying to eliminate any possible user error… The “Server Name” field is available in the database information section (shame you cant ‘design’ this screen…) so it must be available somehow…??

As Erik said, search the forum, you will find quite a few ideas on the subject. Try searching for: get server date

I have a special main menu form on our test server. This is kept in a fob of its own, and whenever I copy the production database to the test server, I import this fob afterwards. This menu shows a popup with a warning message and its color is the awful green reminiscent of … well, you get my point [;)] Takes but a few seconds and prevents user errors far better than a simple text box on an otherwise identical main menu…