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:
As annoying and broken as that is, it gets worse when I go to save:
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?