I am trying to delete a site column from a list via code.
For this, I am using the Delete method of the SPFieldCollection
collection object that is tied to a list.
When I call the Delete method for a custom site column that I create,
this operation completes successfully as expected. However, when I try
to delete a site column from a list that appears to be a standard site
column (such as Scheduling Start Date), the call to the Delete method
throws an InvalidOperationException with the message being something
about an invalid operation occurred due to the current state of the
object. No other details are provided.
Can anyone tell me how to delete this site column from the list? Can
anyone tell me what the exception is complaining about?
Do you know someone who can help? Share a link to this thread on twitter, or facebook.