Share via


DELETEFIELD Method

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Deletes a field from a SharePoint list.

Note

This method is deprecated and may not be supported in future releases. Instead, use the following Web service method:UpdateList 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>
</Method>

Parameters

Parameter

Description

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.

Decoded

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

See Also

Concepts

Error Message Format for Windows SharePoint Services