Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.1.1
  CreateItem
Prev Next

CreateItem adds the given item to the physical storage.  The method returns True if the creation was successful, False otherwise.

bool CreateItem(
  ID itemID,
  string itemName,
  ID templateID,
  ItemDefinition parent,
  CallContext context
)

Sitecore calls the CreateItem method to add a new item to the physical storage.  Note that the method does not accept a language or a version.  The method must add the item to the data storage such that it is identified by itemID, its name is set to itemName, it is based on the template identified by templateID, and its parent is identified by parent.


Prev Next