SP.ContentTypeCollection.addExistingContentType(contentType) Method
Applies to: SharePoint Foundation 2010
In this article
Return Value
Applies To
Remarks
Adds the specified content type to the collection.
var value = SP.ContentTypeCollection.addExistingContentType(contentType);
Parameters
- contentType
A SP.ContentType Class object that represents the content type to add to the collection. It must not be null.
Type: SP.ContentType
Return Value
Type: SP.ContentType
Applies To
SP.ContentTypeCollection Class
Exceptions
- [ServerException]
The collection is read only.
- [SPException]
A content type with same name as the given content type exists in the collection.
Remarks
The name of the given content type must not be the same as any of the content types in the collection.
See Also
Reference
SP.ContentTypeCollection Methods