external help file | Module Name | online version | schema |
---|---|---|---|
AMSoftware.Dataverse.PowerShell.dll-Help.xml |
AMSoftware.Dataverse.PowerShell |
2.0.0 |
Add a global Choice (OptionSet)
Add-DataverseChoice -InputObject <OptionSetMetadata> [<CommonParameters>]
Add-DataverseChoice -Name <String> -DisplayName <String> [-Description <String>] [-ExternalName <String>]
-Options <OptionMetadata[]> [<CommonParameters>]
Add a Global Choice (OptionSet) to Dataverse. Options are provided as an array of OptionMetadata objects.
PS C:\> $options = @(
[dvchoiceoption]::new([dvlabel]'Label 1', 876999001)
[dvchoiceoption]::new([dvlabel]'Label 2', 876999002)
)
PS C:\> Add-DataverseChoice -Name 'globaloption' -DisplayName 'Global Option' -Options $options
NOTE: The prefix for the choice options isn't set automatically based on the solution, but has to be provided and is used as-is.
The description for the global Choice
Type: System.String
Parameter Sets: AddNewChoice
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The display name for the global Choice
Type: System.String
Parameter Sets: AddNewChoice
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The external name for the global Choice
Type: System.String
Parameter Sets: AddNewChoice
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A OptionSetMetadata object containing all information for the global Choice.
Type: Microsoft.Xrm.Sdk.Metadata.OptionSetMetadata
Parameter Sets: AddChoiceObject
Aliases: Choice, OptionSet
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The logicalname for the Choice
Type: System.String
Parameter Sets: AddNewChoice
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Array of OptionMetadata objects containing the Choices values
Type: Microsoft.Xrm.Sdk.Metadata.OptionMetadata[]
Parameter Sets: AddNewChoice
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.