Rename Content Type Title Field

%3CLINGO-SUB%20id%3D%22lingo-sub-13008%22%20slang%3D%22en-US%22%3ERename%20Content%20Type%20Title%20Field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-13008%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20everyone.%3C%2FP%3E%3CP%3EOften%2C%20when%20I%20develop%20a%20SharePoint%20solution%2C%20I%20must%20rename%20the%20Title%20field%20display%20name%20of%20a%20content%20type%20with%20another%20more%20explanatory%20(e.g.%20Customer%20Name%20in%20a%20hypothetical%20customer%20content%20type).%3C%2FP%3E%3CP%3EUsing%20Visual%20Studio%20solution%2C%20I%20usually%20break%20inherits%20from%20its%20parent%20and%20redefine%20the%20Title%20Field%20like%20this%E2%80%A6%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CELEMENTS%20xmlns%3D%22%26quot%3B%26lt%3BA%22%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2F%3C%2FA%3E%22%26gt%3B%3C%2FELEMENTS%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3C!--%20Parent%20ContentType%3A%20Item%20(0x01)%20--%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CCONTENTTYPE%20id%3D%22%26quot%3B0x01005369A2D446624983B653152268889E89%26quot%3B%26lt%3B%2FP%22%3E%3C%2FCONTENTTYPE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Name%3D%22My%20Customer%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Group%3D%22zFields%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Description%3D%22My%20Customer%20Content%20Type%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Inherits%3D%22FALSE%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Version%3D%220%22%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CFIELDREFS%3E%3C%2FFIELDREFS%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CFIELDREF%20id%3D%22%26quot%3B%7Bbc91a437-52e7-49e1-8c4e-4698904b2b6d%7D%26quot%3B%22%20name%3D%22%26quot%3BLinkTitleNoMenu%26quot%3B%22%20displayname%3D%22%26quot%3BCustomer%22%20name%3D%22%22%3E%3C%2FFIELDREF%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CFIELDREF%20id%3D%22%26quot%3B%7B82642ec8-ef9b-478f-acf9-31f7d45fbc31%7D%26quot%3B%22%20name%3D%22%26quot%3BLinkTitle%26quot%3B%22%20displayname%3D%22%26quot%3B%22%20customer%3D%22%22%20name%3D%22%22%3E%3C%2FFIELDREF%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CFIELDREF%20id%3D%22%26quot%3B%7Bfa564e0f-0c70-4ab9-b863-0177e6ddd247%7D%26quot%3B%22%20name%3D%22%26quot%3BTitle%26quot%3B%22%20displayname%3D%22%26quot%3B%22%20customer%3D%22%22%20name%3D%22%22%3E%3C%2FFIELDREF%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CFIELDREF%20id%3D%22%26quot%3B%7BE59418AE-B760-47F3-95F6-F9C215494461%7D%26quot%3B%22%20name%3D%22%26quot%3BField1%26quot%3B%22%20displayname%3D%22%26quot%3BField1%26quot%3B%22%3E%3C%2FFIELDREF%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CFIELDREF%20id%3D%22%26quot%3B%7BC578C6BA-C020-4AB9-B557-09FC0A5BAAEC%7D%26quot%3B%22%20name%3D%22%26quot%3BField2%26quot%3B%22%20displayname%3D%22%26quot%3BField2%26quot%3B%22%3E%3C%2FFIELDREF%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20notice%2C%20however%2C%20that%20this%20solution%20often%20generates%20problem%20with%20index%E2%80%A6%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20can%20perform%20the%20same%20operation%20using%20pnp%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ESergio%3C%2FP%3E
Visitor

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