Applies to: SharePoint Foundation 2010

Deletes a field from a SharePoint list.


This method is deprecated and may not be supported in future releases. Instead, use the following Web service method:UpdateList(String, XmlNode, XmlNode, XmlNode, XmlNode, String) Web service method.

<Method ID="Text">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">DELETEFIELD</SetVar>
  <SetVar Name="Field">Field_Name</SetVar>
  <SetVar Name="owshiddenversion">Integer</SetVar>




ID = "Text"

Application-specific string. In an HTML editor compatible with Microsoft Windows SharePoint Services, such as Microsoft Office SharePoint Designer 2007, the string provides the sequence number of the method, the name of the method, and the name of the field to delete.

Scope = "Request"

When set to Request, the Scope attribute sets the variable for the scope of the enclosing Method element, unless the variable is changed by another tag.

Name = "Cmd"

Must be set to DELETEFIELD.

Name = "Field"

The name of the field to delete.

Name = "owshiddenversion"

The current version number of the list. The DELETEFIELD command only works if Windows SharePoint Services and the client agree on the version number of the list. This ensures that a user does not unintentionally overwrite a schema change that occurred since the user obtained the schema. The DELETEFIELD command succeeds only when the specified version number equals the current schema version stored in the database.


<Method ID="0,DELETEFIELDsample">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">DELETEFIELD</SetVar>
  <SetVar Name="Field">sample</SetVar>
  <SetVar Name="owshiddenversion">8</SetVar>

See Also


Error Message Format for SharePoint Foundation