SP.ContentTypeCollection.getById(contentTypeId) Method
Applies to: SharePoint Foundation 2010
In this article
Return Value
Applies To
Remarks
Returns the content type with the specified ID from the collection.
var value = SP.ContentTypeCollection.getById(contentTypeId);
Parameters
- contentTypeId
A string that contains the content type ID. It must not be null. It must conform to the following ABNF: nonzero-digit = "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"digit = "0" / nonzero-digitnonzero-hexdigit = nonzero-digit / "A" / "B" / "C" / "D" / "E" / "F"hexdigit = "0" / nonzero-hexdigitid = *(nonzero-hexdigit hexdigit / "0" nonzero-hexdigit)parentids = *(16(hexdigit hexdigit))contentTypeId = id [ "00" parentids].
Type: String
Return Value
Type: SP.ContentType
Applies To
SP.ContentTypeCollection Class
Remarks
If a content type with the given identifier is not found in the collection, the server must return null.
See Also
Reference
SP.ContentTypeCollection Methods