Table of Contents

Class SettingsManager

Namespace
Hsl.Xrm.Sdk
Assembly
Hsl.Xrm.Sdk.Core.dll
public static class SettingsManager
Inheritance
SettingsManager
Inherited Members

Methods

RetrieveSetting(IOrganizationService, string, bool, string?)

Used with the Hitachi Solutions - Settings solution. This allows for pulling of a setting value from the Hsl - Setting entity based on key. It can decrypt the value if specified to do so.

public static string RetrieveSetting(this IOrganizationService orgService, string key, bool decryptValue = true, string? decryptKey = null)

Parameters

orgService IOrganizationService

Organization Service

key string

A single setting key. Ex. hsl.setting.setting1 (gets only hsl.setting.setting1 setting)

decryptValue bool

Set to true if you want the encrypted values decrypted. Default = true

decryptKey string

Set the encryption key. Default = null (uses the default encryption key)

Returns

string

The value associated with the specified setting key

RetrieveSettingEntities(IOrganizationService, string[], bool, string?)

Used with the Hitachi Solutions - Settings solution. This allows for pulling of settings from the Hsl - Setting entity based on keys or prefixes. It can decrypt the values if specified to do so.

public static EntityCollection RetrieveSettingEntities(this IOrganizationService orgService, string[] keysOrPrefixes, bool deobfuscateValues = true, string? deobfuscateKey = null)

Parameters

orgService IOrganizationService

Organization Service

keysOrPrefixes string[]

Array of keys or prefixes. Allows for * at the end to do an ends with. Otherwise, uses equal. Ex. hsl.setting.* (gets all settings with hsl.setting. prefix) or hsl.setting.setting1 (gets only hsl.setting.setting1 setting)

deobfuscateValues bool

Set to true if you want the encrypted values decrypted. Default = true

deobfuscateKey string

Set the encryption key. Default = null (uses the default encryption key)

Returns

EntityCollection

An entity collection for each specified setting key or prefix

RetrieveSettings(IOrganizationService, string, bool, string?)

Used with the Hitachi Solutions - Settings solution. This allows for pulling of settings from the Hsl - Setting entity based on key or prefix. It can decrypt the values if specified to do so.

public static Dictionary<string, string> RetrieveSettings(this IOrganizationService orgService, string keyOrPrefix, bool decryptValues = true, string? decryptKey = null)

Parameters

orgService IOrganizationService

Organization Service

keyOrPrefix string

Allows for * at the end to do an ends with. Otherwise, uses equal. Ex. hsl.setting.* (gets all settings with hsl.setting. prefix) or hsl.setting.setting1 (gets only hsl.setting.setting1 setting)

decryptValues bool

Set to true if you want the encrypted values decrypted. Default = true

decryptKey string

Set the encryption key. Default = null (uses the default encryption key)

Returns

Dictionary<string, string>

A dictionary of key-value pairs for each specified setting key or prefix

RetrieveSettings(IOrganizationService, string[], bool, string?)

Used with the Hitachi Solutions - Settings solution. This allows for pulling of settings from the Hsl - Setting entity on keys or prefixes. It can decrypt the values if specified to do so.

public static Dictionary<string, string> RetrieveSettings(this IOrganizationService orgService, string[] keysOrPrefixes, bool deobfuscateValues = true, string? deobfuscateKey = null)

Parameters

orgService IOrganizationService

Organization Service

keysOrPrefixes string[]

Array of keys or prefixes. Allows for * at the end to do an ends with. Otherwise, uses equal. Ex. hsl.setting.* (gets all settings with hsl.setting. prefix) or hsl.setting.setting1 (gets only hsl.setting.setting1 setting)

deobfuscateValues bool

Set to true if you want the encrypted values decrypted. Default = true

deobfuscateKey string

Set the encryption key. Default = null (uses the default encryption key)

Returns

Dictionary<string, string>

A dictionary of key-value pairs for each specified setting key or prefix