Skip to content

Commit

Permalink
Aligns options for 'spo contenttype field' commands. Closes #6170
Browse files Browse the repository at this point in the history
  • Loading branch information
MathijsVerbeeck authored and Adam-it committed Sep 27, 2024
1 parent ae7ab52 commit 1b65528
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 57 deletions.
14 changes: 7 additions & 7 deletions docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ m365 spo contenttype field remove [options]
`--listUrl [listUrl]`
: Server- or site-relative URL of the list (if it is a list content type). Specify either `listTitle`, `listId` or `listUrl`.

`-i, --contentTypeId <contentTypeId>`
`--contentTypeId <contentTypeId>`
: The ID of the content type to remove the column from.

`--fieldLinkId <fieldLinkId>`
`-i, --id <id>`
: The ID of the column to remove.

`-c, --updateChildContentTypes`
Expand All @@ -45,31 +45,31 @@ m365 spo contenttype field remove [options]
Remove column with a specific ID from a content type with a specific ID from a specific site.

```sh
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A6" --fieldLinkId "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --force
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A6" --id "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --force
```

Remove column with a specific ID from a content type with a specific ID from a specific site and updating the child content types.

```sh
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A6" --fieldLinkId "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --updateChildContentTypes
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A6" --id "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --updateChildContentTypes
```

Remove fieldLink with a specific ID from a list (obtained by Title) content type with a specific ID on a specific site.

```sh
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A60062F089A38C867747942DB2C3FC50FF6A" --fieldLinkId "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --listTitle "Documents"
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A60062F089A38C867747942DB2C3FC50FF6A" --id "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --listTitle "Documents"
```

Remove fieldLink with a specific ID from a list (obtained by ID) content type with a specific ID on a specific site.

```sh
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A60062F089A38C867747942DB2C3FC50FF6A" --fieldLinkId "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --listId "8c7a0fcd-9d64-4634-85ea-ce2b37b2ec0c"
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A60062F089A38C867747942DB2C3FC50FF6A" --id "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --listId "8c7a0fcd-9d64-4634-85ea-ce2b37b2ec0c"
```

Remove fieldLink with a specific ID from a list (obtained by URL) content type with a specific ID on a specific site.

```sh
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A60062F089A38C867747942DB2C3FC50FF6A" --fieldLinkId "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --listUrl "/shared documents"
m365 spo contenttype field remove --contentTypeId "0x0100CA0FA0F5DAEF784494B9C6020C3020A60062F089A38C867747942DB2C3FC50FF6A" --id "880d2f46-fccb-43ca-9def-f88e722cef80" --webUrl https://contoso.sharepoint.com --listUrl "/shared documents"
```

## Response
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ m365 spo contenttype field set [options]
`-u, --webUrl <webUrl>`
: Absolute URL of the site where the content type is located.

`-c, --contentTypeId <contentTypeId>`
`--contentTypeId <contentTypeId>`
: ID of the content type on which the field reference should be set.

`--id <id>`
`-i, --id <id>`
: ID of the field to which the reference should be set.

`-r, --required [required]`
Expand Down
22 changes: 22 additions & 0 deletions docs/docs/v10-upgrade-guidance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,28 @@ In the previous version of CLI, the command output had a `Rights` property that

Please, check the documentation of the [spo applicationcustomizer get](./cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx) command to see the updated output and adjust your scripts accordingly.

### Updated `spo contenttype field remove` options

We made some slight changes to the options of command [spo contenttype field remove](./cmd/spo/contenttype/contenttype-field-remove.mdx) command. The following changes were made:

- Removed the short option for `contentTypeId`.
- Renamed the option `fieldLinkId` to `id` and added the short option `i`.

#### What actions do I need to take?

Please update your scripts to make sure that you use the new name/short options.

### Updated `spo contenttype field set` options

We updated the [spo contenttype field set](./cmd/spo/contenttype/contenttype-field-set.mdx) command. We made the following changes:

- Removed the short option for `contentTypeId`
- Add the short option `i` for `id`

#### What actions do I need to take?

Please update your scripts to make sure that you use the correct options.

## SharePoint Framework

### Removed overwrite option from `spfx project github workflow add` command
Expand Down
Loading

0 comments on commit 1b65528

Please sign in to comment.