pacx settings create - neronotte/Greg.Xrm.Command GitHub Wiki

Creates a new setting in the current environment

Aliases

pacx setting create
pacx setting new
pacx settings new
pacx create-setting
pacx new-setting

Usage

Creates a new setting in the current environment. The bare minimum information to provide is the display name of the setting

pac settings create --displayName "My Setting"

You can also provide a description and a default value. The value type must match the setting declared type

pac settings create --displayName "My Setting" -dv DefaultValueForMySetting
pac settings create --displayName "My Setting" --type Number -dv 1012
pac settings create --displayName "My Setting" --type Boolean -dv true

The change option can be used to indicate if and where the setting can be overridden. It may assume one of the following values:

  • None: the setting can't be overridden
  • EnvApp: allows both the setting environment value and setting app values to override the default value. (this is the default)
  • Env: allows only the setting environment value to override the default value.
  • App: allows only setting app values to override the default value.
pac settings create --displayName "My Setting" -dv DefaultValueForMySetting --change None

Arguments

Long Name Short Name Required? Description Default value Valid values
displayName dn Y The name displayed to consumers of the setting in all user interfaces where settings are displayed. - String
name n N The unique name of the setting in an environment. If not provided, the name is automatically generated based on the display name provided but can be changed before the setting is created. Once a setting is created, the Name can't be changed as it may be referenced in applications or code. Name has a prefix that corresponds to the solution publisher. This prefix is intended to give the setting a unique name if you want to import them into another solution or environment in the future (which would have a different prefix). - String
description d N A description of the setting that helps others understand what the setting is used for in all user interfaces where settings are displayed. - String
type t N The data type of a setting controls how the setting’s value is stored. Data type can be set to Number, String, or Yes/No. Data type can't be changed after the setting is created. String Number, String, Boolean
defaultValue dv N The default value of the setting. It specifies the setting's value that will be used unless it is overridden by a setting environment value or a setting app value. It should match the setting type. For booleans you can also provide an int value: 0 means false, any other value means true. - String
change c N Indicates where the setting can be overridden. EnvApp None, Env, App, EnvApp
rel r N Release level is used to inform the framework and other consumers of the setting about the state of the feature that the setting is used with. Release level can be set to Generally available or Preview. GA GA, Preview
url u N A link to documentation to help consumers of the setting understand the purpose of the setting. Will be used as a Learn more link in all user interfaces where settings are displayed. - String
solution s N The solution where to save the created setting. If not specified, the default solution is considered. - String