0

I'm developing a feature with 2 content types; A document set and a picture

I need that my document set allow my second content type Picture.

I've tested this but nothing happens if Igo to manage document set

    <?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Parent ContentType: Document Set (0x0120D520) -->
  <ContentType ID="0x0120D520003E4980F3009045648C71163A63AFE9C1" Name="DocumentSetGeolocation" Group="test" Description="My Content Type" Inherits="TRUE" Version="0">
    <FieldRefs>
      <FieldRef ID="{99afd525-b766-4249-b933-de94c987d218}" DisplayName="N° chantier" Required="FALSE" Name="N_chantier" />
    </FieldRefs>
    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes">
        <act:AllowedContentTypes xmlns:act="http://schemas.microsoft.com/office/documentsets/allowedcontenttypes" LastModified="1/1/2010 08:00:00 AM">
          <AllowedContentType id="0x010102003139F2673D35495C861AF26048B55D78" />
        </act:AllowedContentTypes>
      </XmlDocument>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/office/documentsets/defaultdocuments">
        <dd:DefaultDocuments xmlns:dd="http://schemas.microsoft.com/office/documentsets/defaultdocuments" AddSetName="TRUE" LastModified="1/1/2010 08:00:00 AM">
          <DefaultDocument name="PictureGeolocation.xsn" idContentType="0x010102003139F2673D35495C861AF26048B55D78" />
        </dd:DefaultDocuments>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>
</Elements>

1 Answer 1

0
Write-Host -f Green "Adding Content Type to Document set: DocumentsetName"
Add-SPOContentTypeToDocumentSet -DocumentSet "DocumentsetName" -ContentType "picture"

Use SharePoint Online PnP https://github.com/OfficeDev/PnP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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