external help file | Module Name | online version | schema |
---|---|---|---|
AMSoftware.Crm.PowerShell.Commands.dll-Help.xml |
AMSoftware.Crm |
2.0.0 |
Add a key to an entity.
Add-CrmEntityKey [-Entity] <String> [-InputObject] <EntityKeyMetadata> [-PassThru] [<CommonParameters>]
Add-CrmEntityKey [-Entity] <String> [-Name] <String> [-DisplayName] <String> -Attributes <String[]>
[-SchemaName <String>] [-PassThru] [<CommonParameters>]
Add a key to an entity.
PS C:\> Add-CrmEntityKey -Entity account -Name accountnumber -DisplayName Accountnumber -Attributes @('accountnumber')
Add accountnumber as unique key on account.
The LogicalName of the attributes for the key.
Type: System.String[]
Parameter Sets: AddEntityKey
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The displayname for the key.
Type: System.String
Parameter Sets: AddEntityKey
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The LogicalName of the entity the add the key to.
Type: System.String
Parameter Sets: AddEntityKeyByInputObject
Aliases: EntityLogicalName, LogicalName
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: System.String
Parameter Sets: AddEntityKey
Aliases: EntityLogicalName, LogicalName
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The EntityKeyMetadata of the key to add.
Type: Microsoft.Xrm.Sdk.Metadata.EntityKeyMetadata
Parameter Sets: AddEntityKeyByInputObject
Aliases: EntityKey
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
The name for the key.
Type: System.String
Parameter Sets: AddEntityKey
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Returns an object that represents the EntityKeyMetadata. By default, this cmdlet does not generate any output.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The SchemaName for the key. If omitted the Name will be used as the SchemaName.
Type: System.String
Parameter Sets: AddEntityKey
Aliases:
Required: False
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.