This topic has not yet been rated - Rate this topic

Lists.CreateContentType Method

Windows SharePoint Services 3
Creates a list content type on the list.

Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/CreateContentType", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public string CreateContentType (
	string listName,
	string displayName,
	string parentType,
	XmlNode fields,
	XmlNode contentTypeProperties,
	string addToView
)

Parameters

listName

A string containing the name of the list on which to create the content type.

displayName

A string that represents the display name of the list content type.

parentType

A string that contains the content type ID of the site content type on which to base the list content type.

fields

A string representing the collection of columns to include on the new site content type.

Format the column collection as a FieldRefs element, where each FieldRef child element represents a reference to an existing column to include on the content type.

contentTypeProperties

A string representing the properties to specify for the content type.

Format the properties as a ContentType element, and include the element attributes for the properties you want to specify.

addToView

A string containing "true" or "false" that designates whether to add the content type to the list view.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ