SP.ContentType object (sp.js)

SharePoint 2013

Represents a website, or list, content type.

Last modified: July 01, 2013

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

var object = new SP.ContentType()

The ContentType object has the following members.

Constructor

The ContentType object has the following constructor.

Constructor

Description

ContentType

Initializes a new instance of the SP.ContentType object.

Methods

The ContentType object has the following methods.

Method

Description

deleteObject

Deletes the content type.

update

Updates the content type definition that is stored in the database and, optionally, updates all content types that inherit from the content type.

Properties

The ContentType object has the following properties.

Property

Description

description

Gets or sets a description of the content type.

displayFormTemplateName

Gets or sets a value that specifies the name of a custom display form template to use for list items that have been assigned the content type.

displayFormUrl

Gets or sets a value that specifies the URL of a custom display form to use for list items that have been assigned the content type.

documentTemplate

Gets or sets a value that specifies the file path to the document template used for a new list item that has been assigned the content type.

documentTemplateUrl

Gets a value that specifies the URL of the document template assigned to the content type.

editFormTemplateName

Gets or sets a value that specifies the name of a custom edit form template to use for list items that have been assigned the content type.

editFormUrl

Gets or sets a value that specifies the URL of a custom edit form to use for list items that have been assigned the content type.

fieldLinks

Gets the column (also known as field) references in the content type.

fields

Gets a value that specifies the collection of fields for the content type.

group

Gets or sets a value that specifies the content type group for the content type.

hidden

Gets or sets a value that specifies whether the content type is unavailable for creation or usage directly from a user interface.

id

Gets a value that specifies an identifier for the content type.

jsLink

Gets or sets the JSLink for the content type custom form template.

name

Gets or sets a value that specifies the name of the content type.

newFormTemplateName

Gets or sets a value that specifies the name of the content type.

newFormUrl

Gets or sets a value that specifies the name of the content type.

parent

Gets the parent content type of the content type.

readOnly

Gets or sets a value that specifies whether changes to the content type properties are denied.

schemaXml

Gets a value that specifies the XML Schema representing the content type.

schemaXmlWithResourceTokens

Gets a non-localized version of the XML schema that defines the content type.

scope

Gets a value that specifies a server-relative path to the content type scope of the content type.

sealed

Gets or sets whether the content type can be modified.

stringId

A string representation of the value of the Id.

workflowAssociations

Gets a value that specifies the collection of workflow associations for the content type.

Endpoint URI structure

http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes(contenttypeid)

HTTP requests

This resource supports the following HTTP commands:

DELETE syntax

DELETE http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes(contenttypeid)

MERGE syntax

MERGE http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes(contenttypeid)

POST syntax

POST http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes(contenttypeid)

PUT syntax

PUT http://<sitecollection>/<site>/_api/web/lists(listid)/contenttypes(contenttypeid)
Show:
© 2015 Microsoft