saveSetting()

Overview

public any function saveSetting(
      required string category
    , required string setting 
    , required string value   
    ,          string siteId   = ""
    ,          string tenantId
)

Saves the value of a setting. See Editable system settings for a full guide.

Arguments

NameTypeRequiredDescription
categorystringYesCategory name of the setting to save
settingstringYesName of the setting to save
valuestringYesValue to save
siteIdstringNo (default="")Deprecated (use tenantId): ID of site to which the setting applies (optional, if empty setting is treated as system wide default)
tenantIdstringNoID of the tenant to which the setting applies (optional, if empty setting is treated as system wide default)