Rename Content Type Title Field

Copper Contributor

Hello everyone.

Often, when I develop a SharePoint solution, I must rename the Title field display name of a content type with another more explanatory (e.g. Customer Name in a hypothetical customer content type).

Using Visual Studio solution, I usually break inherits from its parent and redefine the Title Field like this…

 

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

  <!-- Parent ContentType: Item (0x01) -->

  <ContentType ID="0x01005369A2D446624983B653152268889E89"

               Name="My Customer"

               Group="zFields"

               Description="My Customer Content Type"

               Inherits="FALSE"

               Version="0">

    <FieldRefs>

      <FieldRef ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" Name="LinkTitleNoMenu" DisplayName="Customer Name" Required="TRUE"   />

      <FieldRef ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" Name="LinkTitle" DisplayName=" Customer Name " Required="TRUE" />

      <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" DisplayName=" Customer Name " Required="TRUE" />

      <FieldRef ID="{E59418AE-B760-47F3-95F6-F9C215494461}" Name="Field1" DisplayName="Field1" />

      <FieldRef ID="{C578C6BA-C020-4AB9-B557-09FC0A5BAAEC}" Name="Field2" DisplayName="Field2" />

    </FieldRefs>

  </ContentType>

</Elements>

 

I notice, however, that this solution often generates problem with index…

 

How can perform the same operation using pnp?

 

Thanks,

Sergio

0 Replies