Accessing Environment in Process using code

  • 14 January 2008
  • 1 reply
  • 0 views

Badge +4

Hi,


How do I access the Environment fields in code inside my process. I have looked at the EnvironmentSettingsManager but need to understand if its best practice to use this class inside your process (require a reference to SourceCode.EnvironmentLibrary) to access the Enironment fields using code?


Cheers, G


1 reply

Badge +9

If you are simply trying to retrieve a value from an Environment Variable, you can use the StringTable object within a Server Event (just like in K2.net 2003).


For example:


            string strMailServer = K2.StringTable["Mail Server"];
 


HTH.

Reply