Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Delete Site Column From List..

  Asked By: Dontae Rosa         Date: May 22, 2007      Category: Sharepoint      Views: 346
 

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.

Tagged:          

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Delete Site Column From List.. Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].