0

I am creating a document set content type and I want a custom field to appear in the welcome page. Strange this is that it appears on the new form, but not in the welcome page As you can see in the code below, the id are the same

 <ContentType ID="0x0120D520009B92940A0AEA485ABBD36F6C18024964"
               Name="$Resources:xxx,content_types_bill_name;"
               Group="$Resources:xxx,contenttypes_clientManagement_group;"
               Description="$Resources:xxx,content_types_bill_description;"
               ProgId="SharePoint.DocumentSet"
               Inherits="TRUE"
               Version="0">
    <Folder TargetName="_cts/Bill" />
    <FieldRefs>
      <FieldRef ID="{3814501B-C276-4B03-9695-1C80B5661BC9}"
                Name="xxx_ClientCode"
                Required="FALSE" />
    </FieldRefs>


    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/office/documentsets/welcomepagefields">
        <wpf:WelcomePageFields xmlns:wpf="http://schemas.microsoft.com/office/documentsets/welcomepagefields" LastModified="05/12/2012 13:23:22">
          <WelcomePageField id="3814501B-C276-4B03-9695-1C80B5661BC9" />
        </wpf:WelcomePageFields>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>
  • Can it be as easy as adding the curly brackets around the ID in the WelcomePageField element as well? – Robert Lindgren Jun 17 '13 at 13:10
1

The problem is that you have set Inherits="TRUE". When you do that, and deploy/install your content type, SharePoint will conveniently ignore anything in the XMLDocuments section of your content type definition. Not a big deal for a lot of content types that don't necessarily need anything in the XMLDocuments section, but a big problem for Document Sets, which rely heavily on the XMLDocuments.

I ran into this problem myself, and have developed a workaround where you can re-inject your custom XMLDocuments into the content type definitions after they have been deployed to a site, using a feature receiver. Example code can be found on my blog.

Incidentally, I really needed to be able to set Inherits="TRUE" in order to publish my content types through a Content Type Hub. If you don't need to do this, you can have your content type preserve all of it's customization by setting Inherits="FALSE". If you do that, however, you will need to remember to explicitly include everything that you would be inheriting from the base Document Set content type (all the default FieldRefs, the Document Set event receivers, etc.)

  • awesome, works like a charm. – Luis Valencia Jun 18 '13 at 7:12

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.