Show / Hide Table of Contents

    Class SettingsManager

    Inheritance
    System.Object
    SettingsManager
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Hsl.Xrm.Sdk
    Assembly: Hsl.Xrm.Sdk.Core.dll
    Syntax
    public static class SettingsManager

    Methods

    RetrieveSetting(IOrganizationService, String, Boolean, 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.

    Declaration
    public static string RetrieveSetting(this IOrganizationService orgService, string key, bool decryptValue = true, string decryptKey = null)
    Parameters
    Type Name Description
    Microsoft.Xrm.Sdk.IOrganizationService orgService

    Organization Service

    System.String key

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

    System.Boolean decryptValue

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

    System.String decryptKey

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

    Returns
    Type Description
    System.String

    The value associated with the specified setting key

    RetrieveSettingEntities(IOrganizationService, String[], Boolean, 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.

    Declaration
    public static EntityCollection RetrieveSettingEntities(this IOrganizationService orgService, string[] keysOrPrefixes, bool deobfuscateValues = true, string deobfuscateKey = null)
    Parameters
    Type Name Description
    Microsoft.Xrm.Sdk.IOrganizationService orgService

    Organization Service

    System.String[] keysOrPrefixes

    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)

    System.Boolean deobfuscateValues

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

    System.String deobfuscateKey

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

    Returns
    Type Description
    Microsoft.Xrm.Sdk.EntityCollection

    An entity collection for each specified setting key or prefix

    RetrieveSettings(IOrganizationService, String, Boolean, 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.

    Declaration
    public static Dictionary<string, string> RetrieveSettings(this IOrganizationService orgService, string keyOrPrefix, bool decryptValues = true, string decryptKey = null)
    Parameters
    Type Name Description
    Microsoft.Xrm.Sdk.IOrganizationService orgService

    Organization Service

    System.String keyOrPrefix

    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)

    System.Boolean decryptValues

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

    System.String decryptKey

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

    Returns
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.String>

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

    RetrieveSettings(IOrganizationService, String[], Boolean, 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.

    Declaration
    public static Dictionary<string, string> RetrieveSettings(this IOrganizationService orgService, string[] keysOrPrefixes, bool deobfuscateValues = true, string deobfuscateKey = null)
    Parameters
    Type Name Description
    Microsoft.Xrm.Sdk.IOrganizationService orgService

    Organization Service

    System.String[] keysOrPrefixes

    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)

    System.Boolean deobfuscateValues

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

    System.String deobfuscateKey

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

    Returns
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.String>

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

    Back to top Hsl.Xrm.Sdk