Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

Provision DocumentLibrary with Managed Metadata column

  Asked By: Nichole    Date: Mar 09    Category: Sharepoint 2010    Views: 3751

Via the SharePoint 2010 UI I've created a DocumentLibrary and added a new
column of type Managed Metadata. I've associated a TermSet with this column
and all works fine. Now I need to create a deployment package in Visual
Studio 2010. It is easy enough to create the Document Library itself, but I
am having trouble creating the Document Library with a Managed Metadata
column. I've followed the below steps

1. Create empty SharePoint 2010 project

2. Added new Empty Element to the project. In the Elements.xml I have

<Field ID="{15712E76-A603-43AB-885E-CE48BD216381}"
Type="TaxonomyFieldTypeMulti" Name="DocTags" DisplayName="DocTags"
ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowField="Term1033"
Required="FALSE" StaticName="DocTagsInternal" Group="NotSure"/>

3. Added ContentType to the project. This is of type Document. Added
FieldRef elements to the Element.xml

4. Added List Definition From Content Type and associated it with the above
Content Type.

5. Created a List Instance of the above List Definition.

6. Build and Deploy.

7. Associate the column with a Term Set.

8. Add Document to the Document Library. I can select a Term from the
applicable TermSet, but when I save the document I get:

Failed to get value of the "DocTags" column from the "Managed Metadata"
field type control. See details in log. Exception message: Invalid field
name. {00000000-0000-0000-0000-000000000000}.

Not sure what this is telling me, so not really sure how to debug the
problem. Any insight on whether I have missed something in CAML or what the
error is telling me is greatly appreciated.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Provision DocumentLibrary with Managed Metadata column Or get search suggestion and latest updates.