CSSyncronizedDocumentConnectToParent Method Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Connects the document to a another document and makes it a part of a document hierarchy.

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

public void ConnectToParent(
	int newParentDocument
)

Parameters

newParentDocument
Type: SystemInt32
A document that should be the new parent document.
  • The newParentDocument document must exist.
  • The newParentDocument document cannot be the actual document.
  • The newParentDocument cannot be a child of actual document.
Exceptions

ExceptionCondition
CSException
  • 1001 - The Session is invalid
  • 1002 - Permission denied
  • 1804 - The document could not be found.
  • 1832 - Can not move. Destination document is a child to the source document.
InvalidOperationException
  • The document is read-only
  • The document has not been created yet, use the Save method.
ArgumentOutOfRangeException
  • newParentDocument cannot be the document itself.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

Both DELETE permission on the document and CREATE on the newParentDocument document is required.
Remarks

  • This method can only be called on a writable, checked out document. Use the ReadOnly property the check this condition.
  • If the document already is connected to a parent document the document will be disconnected and reconnected to the newParentDocument.
  • For new documents that has not yet been saved, you can specify its ParentDocumentID before saving it for the first time. This is the preferred method for connection new documents to a document hierarchy.
See Also

Reference