Question

the problem I have is that for custom content types not all managed metadata column are displayed in Document Information Panel (DIP) for the document in the Office client application.

However, everything works fine with 1 specific content type. Even though the others using exactly the same site columns. The content types are deployed using visual studio to the content type hub, and after this the content types are correctly published to the site collections.

When I create a document based on the second content type in the same library, all fields are showed in the document information panel, except the managed metadata columns.

Is this a known issue or is there a workaround for this?

Thanks in advance!

Kind regards,

Davy

Était-ce utile?

La solution

Yes!

This problem is solved right now.

My issue was that I'm using custom content types deployed by Visual Studio in the content type hub. To create a managed metadata site column in visual studio, you need to have first of all your managed metadata field, but also a hidden field accompagnied to make the actual mapping like the example below:

<Field ID="{B654D984-187A-471B-8738-F08F3356CFDA}"
         Type="TaxonomyFieldType"
         DisplayName="Countries"
         ShowField="Term1033"
         EnforceUniqueValues="FALSE"
         Group="Demo"
         StaticName="Countries"
         Name="Countries">
    <Customization>
      <ArrayOfProperty>
        <Property>
          <Name>TextField</Name>;
          <Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{67308AC2-9556-456B-BF9E-43E8F23EBEE6}</Value>
        </Property>
      </ArrayOfProperty>
    </Customization>
  </Field>
  <Field Type="Note"
         DisplayName="Countries_0"
         StaticName="CountriesTaxHTField0"
         Name="CountriesTaxHTField0"
         ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}"
         ShowInViewForms="FALSE"
         Required="FALSE"
         Hidden="TRUE"
         CanToggleHidden="TRUE"
         Group="Demo"
         RowOrdinal="0"
         />
</Elements>

VERY important here is that when you create your content type using visual studio, you not only have to add the managed metadata site column in your xml (which let the content type work already perfectly) but also add the hidden field to your content type xml !! This way, SharePoint knows that when you have multiple content types with the same site columns in the same library, the second content type also need to get the hidden field from this site columns like in the example below!

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Parent ContentType: Document (0x0101) -->;
  <ContentType ID="0x010100571ebc0f478a49d5a775039347ee1535"
               Name="Document Location"
               Group="Demo"
               Description="A content type containing Managed Metadata Column."
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
      <FieldRef ID="{B654D984-187A-471B-8738-F08F3356CFDA}" Name="Countries"/>
      <FieldRef ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}" Name="CountriesTaxHTField0"/>
      <FieldRef ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" Name="TaxCatchAll"/>
      <FieldRef ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" Name="TaxCatchAllLabel"/>
    </FieldRefs>
  </ContentType>
</Elements>

I'm very happy I found this solution, because in the whole project i'm implementing, this was used a lot!

Special thanks to the blog of @cann0nf0dder (http://cann0nf0dder.wordpress.com/2013/04/01/creating-a-site-column-with-managed-metadata) which let me think about this!

This ticket is answered now!

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top