How to access system setting inside a Configuration Service?
Dear Community,
Please help me with accessing System Setting inside a configuration service/ Source code.
Thank you.
Like
Hello S Gokul Aditya,
Could you please specify what exactly do you have problem with?
Are you not able to find System Settings in the configuration?
Are you able to find the Systems Settings but not able to change the values?
Looking forward to your response.
Best regards,
Yurii.
Hi Gokul. You can access system settings inside source code using the Terrasoft.Core.Configuration.SysSettings.GetValue method. Pls find below a code snippet -
var settingName = "UsrMyCustomSetting"; var appConnection = HttpContext.Current.Application["AppConnection"] as AppConnection; var settingVal = Terrasoft.Core.Configuration.SysSettings.GetValue<string>(appConnection.SystemUserConnection, settingName);
Alternatively, you can also use the UserConnection as against SystemUserConnection used above.
This question has been answered in this Community question already -
https://community.creatio.com/questions/how-access-system-settings-client-side-and-server-side
The above code snippet is available here - https://customerfx.com/article/retrieving-and-setting-system-settings-in-client-side-and-server-side-code-in-bpmonline/