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

TaxonomyExtensions.EnsureTermSet Method

SharePoint Dev Documents|Last Updated: 6/19/2017
|
1 Contributor

Ensures the named term set exists, returning a reference to the set, and creating or updating as necessary.

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

Syntax

public static TermSet EnsureTermSet(this TermGroup parentGroup, String termSetName, Guid termSetId, Nullable<Int32> lcid, String description, Nullable<Boolean> isOpen, String termSetContact, String termSetOwner)

Parameters

parentGroup

  Type: Microsoft.SharePoint.Client.Taxonomy.TermGroup
  Group to check or create the term set in

termSetName

  Type: System.String
  Name of the term set

(optional) termSetId

  Type: System.Guid
  (Optional) ID of the term set; if not provided the parameter is ignored, a random GUID is used if necessary to create the term set, otherwise if the ID differs a warning is logged

(optional) lcid

  Type: System.Nullable<System.Int32>
  (Optional) Default language of the term set; if not provided the default of the associate term store is used

(optional) description

  Type: System.String
  (Optional) Description of the term set; if null or not provided the parameter is ignored, otherwise the term set is updated as necessary to match the description; passing an empty string will clear the description

(optional) isOpen

  Type: System.Nullable<System.Boolean>
  (Optional) Whether the term store is open for new term creation or not

(optional) termSetContact

  Type: System.String
  (Optional) E-mail address for term suggestions and feedback

(optional) termSetOwner

  Type: System.String
  Owner of termset

Return Value

Type: TermSet
The required term set

See also

© 2018 Microsoft