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

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.

mvp_badge
MVP
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

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, buddy!

It helped me too for my monitoring stuff.

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.

mvp_badge
MVP
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

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, buddy!

It helped me too for my monitoring stuff.

Thanks Daniel and Jon, that really helped me!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.