0
votes

There are some site columns create in our Office365 sharepoint online site which were created using the client side object model (CSOM) with the "Sealed" property set to True.

I now want to delete these columns, but I am unable to do so using the CSOM and I believe this is as a result of the column being sealed.

I have tried to update the field to set the Sealed property to false on the site column, but get an error, and looking at the definition of the CSOM "Sealed" property (https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.client.field.sealed.aspx)), it appears that this property is read only from CSOM.

Can anyone tell me how to update the sealed property of a site column in sharepoint online using the client side object model so that I can then delete the site column?

Or alternately, if this can't be achieved using CSOM, any solution for deleting these columns would be appreciated.

Hopefully there is something very simple that I am missing here?

Thanks in advance for any assistance!

1

1 Answers

0
votes

Do you need to set "AllowUnsafeUpdates" to true first? Something like:

web.AllowUnsafeUpdates = true;

Obviously need to set back to false after you've un-sealed them.