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

TaxonomyExtensions.EnsureTermGroup Method

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

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

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

Syntax

public static TermGroup EnsureTermGroup(this Site site, String groupName, Guid groupId, String groupDescription)

Parameters

site

  Type: Microsoft.SharePoint.Client.Site
  Site connected to the term store to use

groupName

  Type: System.String
  Name of the term group

(optional) groupId

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

(optional) groupDescription

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

Return Value

Type: TermGroup
The required term group

See also

© 2018 Microsoft