5

When creating a FieldCustomizer extension as per the examples given, the process creates a new Site Column to which the customizer applies.

I want to create and deploy an extension that targets an existing column or site column in my SharePoint Online site.

6

This is possible by associating FieldCustomizer to existing field. Field object has ClientSideComponentId property, which should be updated to match the identifier of the FieldCustomizer manifest ID. You can perform needed update to existing field(s) by using CSOM/REST.

Same model also applies to ApplicationCustomizers, which are associated to UserCustomActions using ClientSideComponentId property. You can also update the ClientSideComponentProperties property with any instance level configurations, if needed.

If you use the tenant-wide deployment option, you will only need to have SPFx package installed on the app catalog and this would work. If you do not have tenant-wide deployment option enabled, you'd need to get the SPFx package installed to the site, before extension is loaded for the field.

  • Is there a sample to get the ClientSideComponentId using CSOM/REST? – Biju Joseph - MCSD Feb 27 '18 at 12:02
1

As Vesa suggested, you can update the existing site column 'StockAvailable' property "ClientSideComponentId" by using pnp powershell.

Set-PnPField -Identity 'StockAvailable' -Values @{ClientSideComponentId=[GUID]"213b4c84-b9f6-49bd-ba46-c5a531825421"}

Here replace the above GUID by your SPFX field customizer Id found in manifest src/extension/customizername/**.manifest.JSON.

enter image description here

your already deployed spfx solution will render the field customizer. Below is the my case:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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