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

FieldAndContentTypeExtensions.AddFieldById Method

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

Associates field to content type

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

Syntax

public static void AddFieldById(this ContentType contentType, String fieldId, Boolean required = False, Boolean hidden = False)

Parameters

contentType

  Type: Microsoft.SharePoint.Client.ContentType
  Content Type to add the field to

fieldId

  Type: System.String
  String representation of the id of the field (=Guid)

(optional) required

  Type: System.Boolean
  True if the field is required

(optional) hidden

  Type: System.Boolean
  True if the field is hidden

Return Value

Type: void

See also

© 2018 Microsoft