Closed chrisobriensp closed 7 years ago
This is not currently supported. All SPFx solution features are always scoped to 'Web' scope. We are though looking into releasing additional switches for the developers, which can be used to push out the SPFx solution to be available cross the site collections in the tenant as long as it's installed on the app catalog. You'd still need to associate the extension to be used in the site collection, but you do not need to install SPFx solution specifically to the sites.
This means that from the deployment perspective, scenario or steps would be following.
In your example case, you are building an ApplicationCustomier - so the process would be following to enable that cross specific or all sites.
Hey Vesa,
OK, that works! I don't mind it being a separate thing to do the association/binding, and there's a lot of control that comes it with it being done that way.
Will PnP XML schema be extended to support this?
Cheers,
COB.
Yes - PnP 2017-05 PnP provisioning schema supports this. The engine has not yet been updated to match this requirement due to resource constraints, but coming soon as well. Since we will be however taking a break during July on PnP releases, engine update will be available from August 2017 release forward.
Great, thanks Vesa. Yes, I see the bits of documentation related to this in the 2017-05 schema (e.g. https://github.com/SharePoint/PnP-Provisioning-Schema/blob/master/ProvisioningSchema-2017-05.md#clientsidepages)
Good news all round, thanks!
Cheers,
COB.
@VesaJuvonen You say the engine has not been updated to associate global apps, but are you implying the code/logic behind this is available? Or is backend and PnP wrapper code targeted for August both? If API's are there to deploy to app catalog and associate to a web today I'd be thrilled :) Having it in PnP is nice and preferrable to me, but not a showstopper :)
@wobba - Globally deployed apps/SPFx solution will be soon available with SPFx update for both server and client side. PnP templating does also support associating ClientSideComponentId with the latest schema for the sites, but you can absolutely use also native CSOM to get this completed. Steps to complete the scenario:
We'll obviously announce the global deploy option across different channels when it's available.
Nice :) The association to add oob parts I have allready tried :) And when you fill the deploy gap, that will be huge for the app/add-in model indeed. You guys are just kicking ass making it fun to create solutions for customers.
Hello @chrisobriensp, can you please let me know how can i staple my extension through out all my site collections after i deploy that inside my app catalog? Can i get the extension in all my site collection though out my tenant?
As @VesaJuvonen mentioned, you can use CSOM, REST or PnP to programmatically associate ClientSideComponentId with the site collection you want.
@VesaJuvonen Is there a sample on how to associate my spfx extension to a site collection instead of only a web? Add-PnPCustomAction only adds it to a web scope..
Few things.
@VesaJuvonen Is it possible to control to activation of features inside the feature framework ? Currently whenever a new app is added in a site, the corresponding feature automatically gets activated resulting in creation lists & libraries. I want to activate only on demand or based on the my requirements. This is a very basic requirements and is always available in earlier packaging (WSPs).
@VesaJuvonen Any update on the centralized control for extensions?
I'm struggling to get my ListViewCommandSet loaded on all sites in a site collection. I think I followed the steps described in the previous posts correctly:
The ListViewCommandSet only gets loaded correctly on the root site of the site collection. On the subsites there is the following error message: Failed to loadCommandSet, id: 925aa26d-90ee-4cf7-8246-a38d53733036, error: Error: ***Manifest not found for componentId "925aa26d-90ee-4cf7-8246-a38d53733036". The ID mentioned in the error message is the correct one, the one that is registered in the manifest file.
Is there something else I need to do?
@freekbe try adding the app on your subsites as well, as apps are web scoped.
@wobba Adding the app to the subsites solves this problem. But that is exactly what I want to avoid. The idea is to have the CustomAction activated on SiteCollection level so it is automatically available on all current and future subsites. From the previous comments I understood that this is possible by registering the CustomAction through code on the correct scope.
I got it work! The missing piece of the puzzle is that you need to create a "Tenant-Scoped" solution.
@freekbe sure..that helps if you want it on all sites in your tenant :) didn’t get that from your question.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Category
Expected or Desired Behavior
When creating an SPFx extension (e.g. application customizer), I expected to be able to change the feature scope when the feature is defined in package-solution.json. The default is a site/web scoped feature, but sometimes we may want a site collection-scoped feature.
Observed Behavior
There is no "scope" property of the feature node, and adding one makes the file fail to be validated against schema in the bundling/build process. The following error is observed:
ERROR: Error parsing file 'package-solution.json' (#/solution/features/0) Additional properties not allowed: scope
Steps to Reproduce
Here's an image which shows what I expected to do to change feature scope:
Can this be done? If so, how?
Thanks!
COB.