Usage
spo web commandset get [options]
Description
Get a ListView Command Set that is added to a site.
Options
| Option |
Description |
-u, --webUrl <webUrl> |
The url of the site. |
-t, --title [title] |
The title of the ListView Command Set. Specify either title, id or clientSideComponentId. |
-i, --id [id] |
The id of the ListView Command Set. Specify either title, id or clientSideComponentId. |
-c, --clientSideComponentId [clientSideComponentId] |
The Client Side Component Id (GUID) of the ListView Command Set. Specify either title, id or clientSideComponentId. |
-s, --scope [scope] |
Scope of the ListView Command Set. Allowed values: Site, Web, All. Defaults to All. |
Examples
Retrieves an ListView Command Set by title.
m365 spo commandset get --title "Some customizer" --webUrl https://contoso.sharepoint.com/sites/sales
Retrieves an ListView Command Set by id.
m365 spo commandset get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --webUrl https://contoso.sharepoint.com/sites/sales
Retrieves an ListView Command Set by clientSideComponentId.
m365 spo commandset get --clientSideComponentId 7096cded-b83d-4eab-96f0-df477ed7c0bc --webUrl https://contoso.sharepoint.com/sites/sales
Additional Info
While developing we want to reuse the getCustomActions and getCustomActionById functions of the spo util class.
- If the found custom action is not an command set: throw an error.
- If two or more command set custom actions are found: prompt the user to disambiguate.
We can use the shared code to only query the commandset customaction we want: with a location value of ClientSideExtension.ListViewCommandSet, ClientSideExtension.ListViewCommandSet.CommandBar or ClientSideExtension.ListViewCommandSet.ContextMenu based on the value that's used.
Usage
spo web commandset get [options]
Description
Get a ListView Command Set that is added to a site.
Options
-u, --webUrl <webUrl>-t, --title [title]title,idorclientSideComponentId.-i, --id [id]title,idorclientSideComponentId.-c, --clientSideComponentId [clientSideComponentId]title,idorclientSideComponentId.-s, --scope [scope]Site,Web,All. Defaults toAll.Examples
Retrieves an ListView Command Set by title.
m365 spo commandset get --title "Some customizer" --webUrl https://contoso.sharepoint.com/sites/salesRetrieves an ListView Command Set by id.
Retrieves an ListView Command Set by clientSideComponentId.
Additional Info
While developing we want to reuse the
getCustomActionsandgetCustomActionByIdfunctions of the spo util class.We can use the shared code to only query the commandset customaction we want: with a location value of
ClientSideExtension.ListViewCommandSet,ClientSideExtension.ListViewCommandSet.CommandBarorClientSideExtension.ListViewCommandSet.ContextMenubased on the value that's used.