SharePoint REST Delete ListItem

The SharePoint REST Delete ListItem activity not only supports deleting one or more list items from Microsoft SharePoint lists.

This activity supports the following functions:

  • Deleting a data item or a folder from a generic list.
  • Deleting a document library item, a document link, or a folder from a document library.
  • You can delete multiple list items at a time. You can type all the IDs of the list items that you want to delete in the activity. If the amount of list items are unknown, you can use the For-Each statement to map the ID collection to the current activity.

The activity only supports using the list item ID to delete list items. If you want to use other query conditions, you must use the SharePoint REST Select ListItem activity to select the list item first, and then use the SharePoint REST Delete ListItem activity to delete the list item.

Note: The SharePoint REST Delete ListItem activity does not support deleting an item of any content type under Microfeed list type.

General

On the General tab, you can establish a connection to a Microsoft SharePoint server, specify the list item that you want to delete, and set the Timeout time for calling the process.

The following table lists the configurations on the General tab of the SharePoint REST Delete ListItem activity:

Field Module Property? Description
Name No (Required) Specify the name to be displayed as the label for the activity in the process. The default value is SharePointRestDeleteListItem.
SharePoint REST Connection Yes (Required) Click the icon to select a SharePoint REST connection.

If no matching SharePoint REST Connection shared resources are found, click Create Shared Resource to create one. See Creating a SharePoint REST Connection for more details.

Web Name No (Required) Get the target website.

Click Fetch Webs to get available websites from the site collection specified in the SharePoint REST Connection shared resource.

List Name No (Required) Get the list that you want to operate on.

Click Fetch Lists to get available lists from the website selected in the Web Name field.

Timeout(sec) Yes (Required) Specify how long the plug-in waits for the process to perform the delete operation. The default value is 120.
Note: The delete operation might fail or succeed if it times out when started at run time. The result is undefined. You have to provide enough time for the delete operation to perform.

Description

On the Description tab, you can enter a short description for the SharePoint REST Delete ListItem activity.

Input

On the Input tab, you can specify the list item that you want to delete.

The following table lists the input elements on the Input tab of the SharePoint REST Delete ListItem activity:

Input Item Data Type Description
WebName String The target website. You can delete list items across Microsoft SharePoint sites by using the activity. You can add a group to this activity, and get the website from a previously performed activity in the current process.
Note: The value specified in this input item takes precedence over the one set in the General tab.
ID Integer The list item ID.

Output

On the Output tab, the Success node lists the status of all the operations, and the Results node lists the status of the current operation.

The following table lists the output elements on the Output tab of the SharePoint REST Delete ListItem activity:

Output Item Data Type Description
Success Boolean This property indicates the status of all of the operations. If no error occurs when deleting one or more records, the status true is returned.
Results
Result   The Result element contains the following elements:
  • Success (a Boolean value): this property indicates the status of the current operation. If no error occurs when deleting a record, the status true is returned.
  • ErrorMessage (a String value): the message returned from the Microsoft SharePoint system.
  • Item: the output of each attribute of the new item. It varies with different content types. For the meaning of each attribute, see the Microsoft SharePoint documentation for more details.

Fault

On the Fault tab, you can find the error code and error messages of the SharePoint REST Delete ListItem activity. See Error Codes for more detailed explanation of errors.

The following table lists error schema elements on the Fault tab of the SharePoint REST Delete ListItem activity:

Error Schema Element Data Type Description
SharePointRestPluginException
msg String Displays the error message returned by the plug-in.
msgCode String Displays the error code returned by the plug-in.
SharePointRestRemoteException
msg String Displays the error message of the Microsoft SharePoint system when processing a request from the plug-in.
msgcode String Displays the error code of the Microsoft SharePoint system when processing a request from the plug-in.
encoding String Displays the error encoding of the Microsoft SharePoint system when processing a request from the plug-in.
ActivityTimedOutException
msg String Displays the error message when the Delete ListItem operation times out.
msgcode String Displays the error code when the Delete ListItem operation times out.