Check Platform Server running mode on execution

Check Platform Server running mode on execution

Dear All,

We would like to restrict certain buttons to only be shown in our Development and Test and Acceptance environment only.
Production shouldn't have this functionality.

The way we would like to do this is by checking with the platform's running mode to see whether this is set to "Production".

Is there a way (e.g. trough an extension or system function) to do this?

I know I could create a separate Permission or could create an other way to get a comparible result, but I would really like to use the method mentioned above.

It's not exacly the same, but you can easily detect if you're in a Personal Area or not by checking if GetPersonalAreaName = "". In Production Mode there are no personal areas, so it probably cover your case.

Best Regards,
Gustavo Guerra
Thanks for the option Gustavo, it's close, but unfortunately it's not good enough.

Hmmm; I think I'll just create an action checking the Hard-Coded (juch) hostname of my development environment.
Nevermind; I've found a way to solve this.

The (System) E-space has a table called Activation which has the entities (Info, Home, Text).
One of the settings is Server Mode ; the value in development is set to "Development"
Hello all.
If we want to be able to distinguish ALL the environments, in this case Development, Test, Acceptance, and Production, and not just Production from the other environments, how can we do this?
Must we use a Site Property in our espace that defines in which environment are we in? Or is there another way?
Hi Tiago,

I'd advise you to create a local (public) webservice that you can call to determine the server role.
In that E-space you indeed put a site property that is returned by the webservice saying which environment type the server has.
It might be useful to put your types in a Static entity and inherit them.

You could also store your server info in a separate table which you maintain once.
This might come in handy when you'd like to make the environments 'aware' of each other.


The objective is for the web application itself to be aware of the environment where it's running and take different actions, for instance, when in the development environment send alert emails with some tag "[DEV]" in the subject.
Why the advice to use a web service? So that we can determine from the "outsided" wich type of environment is it?

I've created a construction that let's me compare database tables and user roles using the webservices.
One of the reasons why I've created a webservice for this.

Ofcourse if you'd only need the awareness local you don't need any publication of that in a webservice.

You might want to browse through the "Activation" system entity, (Activation.Info = "Server Mode").
This is currently helping me to determine whether I'm on a Production server or not.

It might help you in determining the environment of the server.