Table of contents
TOC
Collapse the table of content
Expand the table of content

FieldAndContentTypeExtensions.ContentTypeExistsById Method

SharePoint Dev Documents|Last Updated: 5/20/2017
|
1 Contributor

Does content type exists in the web

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static bool ContentTypeExistsById(this Web web, String contentTypeId, Boolean searchInSiteHierarchy = False)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Web to be processed

contentTypeId

  Type: System.String
  Complete ID for the content type

(optional) searchInSiteHierarchy

  Type: System.Boolean
  Searches accross all content types in the site up to the root site

Return Value

Type: bool
True if the content type exists, false otherwise

See also

© 2018 Microsoft