Remove ContentField from ContentPart dynamically

Topics: Troubleshooting, Writing modules
Sep 2, 2013 at 7:16 AM

How do I accomplish this?

I tried using ContentDefinitionManager.AlterPartDefinition("PartName", c => c.Remove("FieldName"))

but it doesn't seem to update the part.

Sep 4, 2013 at 12:40 AM
Have you checked the logs for anything unusual?
Also - check if the field was attached to a part or directly to the content item (which is the most common case). In this case the part name is the same as your type name.