Compartilhar via


Delete Method

Applies to: SharePoint Foundation 2010

Deletes the specified item from the list or document library.

Note

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

<Method ID="Text">
  <SetList Scope="Request">GUID</SetList>
  <SetVar Name="Cmd">Delete</SetVar>
  <SetVar Name="ID">Integer</SetVar>
  <SetVar Name="NextUsing">URL</SetVar>
  <SetVar Name="owsfileref">URL</SetVar>
</Method>

Parameters

Parameter

Description

ID = "Text"

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

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 Delete.

Name = "ID"

The ID of the item to delete.

Name = "NextUsing"

Optional. The URL to which the user is redirected after the operation is completed.

Name = "owsfileref"

Optional except for lists of base type Document Library. The URL of the file or folder to delete.

Decoded

<Method ID="0,Delete">
  <SetList Scope="Request">6beeefcd-866d-4fc7-94b9-
     94e6297386bc</SetList>
  <SetVar Name="Cmd">Delete</SetVar>
  <SetVar Name="ID">45</SetVar>
  <SetVar Name="owsfileref">http://Server_Name/sites/Site/
     Document_Library/File</SetVar>
</Method>