Partilhar via


TermSet.AddStakeholder Method

Adds a stakeholder to the TermSet object.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

Syntax

'Declaration
Public Sub AddStakeholder ( _
    stakeholderName As String _
)
'Usage
Dim instance As TermSet
Dim stakeholderName As String

instance.AddStakeholder(stakeholderName)
public void AddStakeholder(
    string stakeholderName
)

Parameters

  • stakeholderName
    Type: System.String

    The login name of the user to be added as a stakeholder

Exceptions

Exception Condition
UnauthorizedAccessException

The current user has insufficient permissions to perform this operation.

ArgumentException

The user name is too long

ArgumentException

The user name cannot be found.

ArgumentNullException

stakeholderName is a null reference (Nothing in Visual Basic) or empty.

Remarks

A stakeholder is a user who has an interest in the current TermSet object. A TermSet can have 0 or more stakeholders. The current user must have TaxonomyRights.Edit permission to use this method. Call the CommitAll() to save this change to the database.

See Also

Reference

TermSet Class

TermSet Members

Microsoft.SharePoint.Taxonomy Namespace

DeleteStakeholder(String)

Stakeholders