DocumentManagerDelete Method (ConnectionId, SessionId, DocumentId, Boolean, Boolean) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Deletes a document permanently or places it in the Recycling bin. If a document is in the Recycling bin this method deletes the document permanently. This methods supports anonymous callers.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)

public void Delete(
	ConnectionId connectionId,
	SessionId sessionId,
	DocumentId documentId,
	bool deleteParentChildRelation,
	bool deletePermanently


Type: ContentStudioConnectionId
A value that identifies the web site
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: ContentStudio.DocumentDocumentId
The document to delete.
Type: SystemBoolean
Regulates whether Content Studio should disconnect the document from its document hierarchy or not. If this parameter is not set and the document is part of a document hierarchy an exception is thrown. Only applicable for documents that should be deleted permanently or for documents placed in the recycling bin.
Type: SystemBoolean
Set to true to permanently delete the document without throwing it onto the recycling bin. This flag has no relevance if the document is in the recycling bin.

CSExceptionA business rule was violated in the underlying Content Studio database
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

DELETE permission on the document is required when throwing the document into the recycle bin. If the document is published APPROVE permission is required as well (this is always true for uploaded files). To delete the document permanently ADMIN permission is required unless the caller has the Security.GlobalRights.DestroyDocuments or Security.GlobalRights.GlobalGroupAdmin right. Additionally workflow rules can apply and override the regular permissions and rights
See Also