Delete Document¶
Properties
- Input
- Document Id
- Type:
int - Description: The unique identifier of the document to be deleted. This is a required argument.
- Type:
- Delete Recursively
- Type:
bool? - Description: Specifies whether to delete all linked documents recursively. This is a required argument.
- Type:
- Delete Training Documents
- Type:
bool? - Description: Specifies whether to also delete training documents when deleting documents recursively. This is a required argument.
- Type:
Usage
- Setup Activity:
- Add the "Delete Document" activity to your UiPath workflow.
- Configure the required input arguments:
- Document Id: Provide the ID of the document you wish to delete.
- Delete Recursively: Set this to
trueif you want to delete all linked documents recursively. - Delete Training Documents: Set this to
trueif you also wish to delete any associated training documents when deleting recursively.
- Execution:
- The activity executes asynchronously, deleting the specified document.
- If
Delete Recursivelyis set totrue, all documents linked to the specified document will also be deleted. - If
Delete Training Documentsis set totrueandDelete Recursivelyis enabled, associated training documents will be included in the deletion process. - Output:
- The activity returns a
DocumentViewModelrepresenting the deleted document. This can be used to confirm the deletion or log the document details.
Considerations
- Data Integrity: Ensure that the document ID is valid and accessible to avoid errors during deletion.
- Cascading Deletions: Be cautious when setting the
Delete RecursivelyandDelete Training Documentsflags, as these will result in multiple documents being deleted, which may impact related workflows or data integrity. - Irreversible Action: Deleting documents is usually irreversible, so ensure that backups or confirmations are in place if needed.