Developer Forum »
System/settings in edit
9 posts

Hello!

How do I access the settings in System --> Settings (edit mode) from code? In particular I need the "Default from email" setting in the Installation tab.

Guro

181 posts

Hi!

Most of the properties on the installation settings node is available on the WAFRuntime.Installation object. In your case you get the DefaultFromEmail like this:

WAFRuntime.Installation.DefaultFromEmail;

Note that not all of the installation settings are available as a shortcut here, you need to fetch the installation node itself. Like this:

Installation inst = WAFRuntime.Engine.SystemSession.GetContent<Installation>();

Note that we don't have to specify the node id, since there is only one Installation node allowed in one installation.

 

9 posts

Using the shortcut I only get an empty string for the DefaultFromEmail setting, but from the Installation node I get the expected value. Thank you!

181 posts

I have created a bug in our bug tracker regarding the empty DefaultFromEmail property. It's probably not initialized property.

Thanks for letting us know!

1