Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.1.1
  CopyItem
Prev Next

CopyItem duplicates the given source item and places the copy as a child of the provided destination item.  The method returns True if the item was copied successfully, False otherwise.

bool CopyItem(
  ItemDefinition source,
  ItemDefinition destination,
  string copyName,
  ID copyID,
  CallContext context
)

Sitecore calls the CopyItem method to duplicate an existing item.  If the data provider supports versioning, all versions of the item data must be copied.  The duplicate item ID must be set to copyID, its name must be set to copyName, and its parent ID must be set to destination.ID


Prev Next