How to get the running mode (dev vs prod) in a server action?

Hello everyone!


I think the title is very explanatory, but in case of any doubt, i am just trying to know what is the Environment Name inside an app. I have tried the GetServerName action from RichWidgets but it's not returning anything. I did so inside a free account, but the Environment Name in the management is crealy labeled as Development, so that is the value it should hold when i execute the server action.

You can reference the 'Server' entity in System to get the server name and or IP. Then you can reference it like any other entity.

Solution

Hi,

Query the Activation entity from Systems espace filter on Activation.Info = "Server Mode" 

The attribute Activation.Text will contain the value.

Regards,

Daniel

Solution

Daniël Kuhlmann wrote:

Hi,

Query the Activation entity from Systems espace filter on Activation.Info = "Server Mode" 

The attribute Activation.Text will contain the value.

Regards,

Daniel

Much better, I wasn't aware of that!


Thanks Daniel and Jon, that really helped me!