Skip to main content

Guide to Pulling Data from the Synergy CONFIGURATIONS Table

This document describes in detail the process of pulling data from the CONFIGURATIONS table in the Synergy application via 'ServiceApi'. You do not need to establish a direct database connection for this operation. What you need is the 'ServiceApi' instance.

Requirements

  • Access to the Synergy 'ServiceApi' instance.
  • Use of the relevant 'ConfigurationManager'.

Steps

  1. ServiceApi Access: Access the Synergy 'ServiceApi' instance. If you don't have an instance, create one accordingly.
  2. Setting Configuration Key: Specify the key ('ConfigurationKey') of the desired configuration value.
  3. Using GetConfiguration: Pull the desired configuration data using the 'ConfigurationAPI.GetConfiguration' method.
  4. Result Processing: Process the result you have obtained. The results will be contained in 'Result.Result.ConfigurationData'.

Sample C# Code

Here's a C# code sample that you can use to pull a configuration value:

'''csharp var configurationValue = _serviceAPI.ConfigurationAPI.GetConfiguration(new Bimser.Synergy.Entities.Configuration.Business.DTOs.Requests.GetConfigurationRequest { ConfigurationKey = "Web.Dashboard.FormName" }). Result.Result.ConfigurationData;


This code pulls the configuration value with the key 'Web.Dashboard.FormName' and stores it in the variable.