Using GetServerName() Within a Timer...(not working?)

Using GetServerName() Within a Timer...(not working?)

  
We have a development, QA, and production environment. I'm trying to use GetServerName() within a timer to return the current server name. It returns an empty string. Is there some other 'timer-equivalent' function I should be using instead?
Hi Daryl,

Apparently GetServerName won't work in timers. I would suggest storing the server name in a site property since it won't change that much...

Would this work for you?
Cheers!

Mario Araujo wrote:
Hi Daryl,

Apparently GetServerName won't work in timers. I would suggest storing the server name in a site property since it won't change that much...

Would this work for you?
Cheers!
 
 I figured it out!! There is a lot on the forum about this issue. I was able to get the server name within a timer by referencing the HtmlRenderer extension and calling the GetMachineName() function. Worked like a charm! I think OutSystems should replace GetServerName() with this one.
 
Thanks for the update Daryl! Glad it works :)

Could you perhaps post your findings in this thread? This way other people can benfit and comment on it.

Have a great weekend!
Mario

P.S. Would you mind taking 5 minutes to helps understand how we can improve the Forums? Just answer a few questions here - http://goo.gl/forms/Kftqm6Rqj4.
Mario Araujo wrote:
Thanks for the update Daryl! Glad it works :)

Could you perhaps post your findings in this thread? This way other people can benfit and comment on it.

Have a great weekend!
Mario

P.S. Would you mind taking 5 minutes to helps understand how we can improve the Forums? Just answer a few questions here - http://goo.gl/forms/Kftqm6Rqj4.
 I added the my findings to the other thread as you requested.

Have a great day!

 
Thanks Daryl - just trying to keep everyone in sync :)