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

FieldAndContentTypeExtensions.AddFieldByName 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 AddFieldByName(this ContentType contentType, String fieldName, Boolean required = False, Boolean hidden = False)

Parameters

contentType

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

fieldName

  Type: System.String
  The title or internal name of the field

(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