0

I have create a SharePoint WebPart as well as a CommandBar-Extension using SPFx. I used the yeoman generator to schaffold the application and finally created a sppkg-file I can deploy to my app-catalog.

However: I would need some kind of configuration for the WebPart and the Extension. If it would only be the WebPart I could work with the WebPart property pane, but for the Commandbar-Extension this doesn't work.

Is there any way to have some kind of configuration-page/setup-page where I could store some value for e.g. as a property (in the site property-bag)?

1 Answer 1

1

You can use ClientSideComponentProperties in SPFx extensions.

ClientSideComponentProperties can be used to provide instance specific configurations in elements.xml file during solution development.

Documentation: Add a ListView Command Set to a solution package for deployment


If you want to change the values of ClientSideComponentProperties after deployment, you can use APIs call for that. Check below link for the same:

How does one pass parameters to SharePoint Framework Extensions in practice?


Update:

Here's one SPFx sample developed by community members which allow you to update properties of SPFx application customizer: Edit Application Customizers

enter image description here

1
  • 1
    Thx. I think I'll go this way and create an "amin webpart" that will allow to configure those properties. Although I would have loved a way that would not involve so much custom code.
    – nyn3x
    Nov 29, 2022 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.