New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New command: spo commandset set
#4338
Comments
For |
That's not entirely true @waldekmastykarz, scope is not a value we set. It's where the command is executed: on site level or web level. |
Ah, got it. So it's meant to lookup the command set, not to update its scope. Let's be sure we clarify that in the description of the option to avoid confusion. |
Better like this? |
Would love to work on this one |
All yours! |
Hi @nicodecleyre, I updated the scope option to be optional with a default value of All. Could you take that into account? I also added some extra remarks. |
Definitely, thank you for letting me know! |
Hi @martinlingstuyl, i guess |
Yes! |
Usage
spo commandset set [options]
Description
Updates a ListView Command Set on a site.
Options
-u, --webUrl <webUrl>
-t, --title [title]
title
,id
orclientSideComponentId
.-i, --id [id]
title
,id
orclientSideComponentId
.-c, --clientSideComponentId [clientSideComponentId]
title
,id
orclientSideComponentId
.--newTitle [newTitle]
-l, --listType [listType]
List
orLibrary
.--clientSideComponentProperties [clientSideComponentProperties]
-s, --scope [scope]
Site
,Web
,All
. Defaults toAll
.--location [location]
ContextMenu
,CommandBar
orBoth
.Examples
Updates the title and location of a ListView Command Set on the sales site.
Updates a ListView Command Set on the sales site with some properties.
Remarks
Add the following notice (like on https://pnp.github.io/cli-microsoft365/cmd/spo/customaction/customaction-add/)
Additional Info
While developing we want to reuse the
getCustomActions
andgetCustomActionById
functions 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.CommandBar
orClientSideExtension.ListViewCommandSet.ContextMenu
based on the value that's used.The
listType
value maps to--registrationId
of the custom action.List
maps to100
,Library
maps to101
The text was updated successfully, but these errors were encountered: