سؤال

According to Field Customizer documentation it is possible to associate it with existing SharePoint field using feature framework. But I am not able to make it work. I am trying to customize the "Name" column (internal name LinkFilename) and using below XML

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <Field ID="{5cc6dc79-3710-4374-b433-61cb4a686c12}"
        Name="LinkFilename"
        DisplayName="Name"
        Type="Computed"
        Min=""
        Required="FALSE"
        Group="Custom Columns"
        ClientSideComponentId="b48a795e-e8d9-47f0-85db-5573bdc9ef11">
   </Field>
</Elements>
هل كانت مفيدة؟

المحلول

It looks like a limitation of SPFx's feature framework's that you can't associate field customizer to existing OOTB fields.

Reference - Highlighting which page is the welcome page in a site

Having said that, you can associate Field Customizer extension to existing OOTB list columns or site columns by setting ClientSideComponentId property of column with value of FieldCustomizer Id which you get from the extension's manifest json file.

You can do as below:

Set-PnPField -Identity "LinkFilename" -List "Documents" 
-Values @{ClientSideComponentId=[GUID]"123b3c84-b9f6-49bd-ba46-c5a531825411"}

If you want to do that at the web level, you can remove the List parameter from the above code.

Do note: If you apply it at the web level, newly created document libraries will automatically get the customizer associated. However, for existing libraries, you will need to do a one time PS script execution with list parameter.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top