Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am creating a custom list definition that contains Managed Metadata fields (TaxonomyFieldType). These taxonomy fields are !important so users should not be able to delete them through the UI. I eventually got it to work using AllowDeletion, but I first tried Sealed. But marking the field as Sealed completely broke the column.

As a sanity test, I created a test list definition with the following four fields:

  • Taxonomy Test A: Sealed=NULL, AllowDeletion=NULL
  • Taxonomy Test B: Sealed=NULL, AllowDeletion=FALSE
  • Taxonomy Test C: Sealed=TRUE, AllowDeletion=NULL
  • Taxonomy Test D: Sealed=TRUE, AllowDeletion=FALSE

When I deploy the solution, create a list instance, and upload a document, columns A and B work fine, but columns C and D are disabled:

EditForm.aspx showing Managed Metadata fields are disabled when sealed

As annoying and broken as that is, it gets worse when I go to save:

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

In this case, the requirement was just to prevent the column from being deleted, so AllowDeletion is a suitable workaround. But what if I truly needed the field to be sealed so that a user cannot change the settings for Multiple Values, Display Format, Default Value, or, most importantly, Term Set?

Is this a bug or by design?

share|improve this question
add comment

1 Answer

Have you considered setting the 'ShowInXXXForm' properties for the field, where XXX is something like the New, Edit, List View, List Settings, etc. pages?

That way, you could simply make them unavailable for deletion, editing, etc., through the UI. The setting that I think you'd be interested in is ShowInListSettings

share|improve this answer
    
That's a good workaround option to deter users from changing what you don't want changed. But it's kind of the nuclear option as it doesn't let the user change what sealed allows you to change (name, description, order). Also, it doesn't truly lock down the column since it can still be edited through URL spoofing. So, a good workaround, but still leaves the question why sealed doesn't work. Thanks. –  Rich Bennema Jul 1 '11 at 17:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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