Subsite.create (Method)

Creates a new subsite under the current subsite.

Returns:

SubsiteID (specialcase)

Arguments:

Name Type Required Description
subsiteIDOrURL SubsiteIDorURL_EmptyString Required The ID of the target subsite, or the server relative path to the target subsite, or an empty string for the current subsite.
subsiteName SubsiteName Required The name of the subsite that CommonSpot will create.
language LanguageName Required This subsite's language.
description PlainText_2000 Optional. Defaults to an empty string. The subsite's description. The description must be 200 characters or less.
displayName PlainText_255 Optional. Defaults to an empty string. The subsite's display name. This is the name that CommonSpot uses when it displays the subsite's name in a breadcrumb listing.

Context:

License Requirements None
Permission Requirements subsite:CreateSubsites
Deny Context None
Require Context AuthoringEnabled
Author Lock (not required)
Transaction Logging If transaction logging is enabled at the site level, calls to this method will be logged
Customization This method may be customized at the site level

Error Codes:

Code Error Message
54000 You cannot create additional subsites because the license limit of $1 has been reached.
54001  
54002 Language $1 is not supported by this site.
54004 The directory needed for subsite '$1' already exists. Either select another name or remove the directory before trying again.
54005 CommonSpot could not create the site directory or one of its subdirectories.

Notes:

None