Delete a SharePoint document

Use this step to delete a document on the Sharepoint site.

Last published at: July 31st, 2023

spDeleteDocument Step

Description:

This step deletes a document on the SharePoint site.

 

Inputs

  • BaseURL – BaseURL for ur Sharepoint site
  • selOAuthProvider - select OAuth Provider 
  • destinationFilePath – Path to save the file in the SharePoint site
  • resultJson – store result in Variable or Global 
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

Example:

Let’s build and execute the “spDeleteDocumentDef” example.          

  • Create a new definition called “spDeleteDocumentDef”
  • Select the definition and click the “design” button
  • Drag a “spDeleteDocument” step to the canvas
  • Connect the dots between the start and “spDeleteDocument” step
  • Define a variable/global to store the result after execution
  • Click the "spDeleteDocument" step to configure its "Settings" properties. Provide a name to the step. Provide the description. Provide the base URL for the SharePoint site.  Provide the path to delete the file in the specified location. Provide a variable/global to store the result after execution. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new process instance, and execute. The process shall start and delete the document from the SharePoint site.