Term.CreateLabel(String, Int32, Boolean) Term.CreateLabel(String, Int32, Boolean) Term.CreateLabel(String, Int32, Boolean) Method


Creates a new Label for this Term.

 Microsoft::SharePoint::Taxonomy::Label ^ CreateLabel(System::String ^ labelName, int lcid, bool isDefault);
[Microsoft.SharePoint.Client.ClientCallableMethod(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, ReturnObjectIdentity=true)]
public Microsoft.SharePoint.Taxonomy.Label CreateLabel (string labelName, int lcid, bool isDefault);
Public Function CreateLabel (labelName As String, lcid As Integer, isDefault As Boolean) As Label
String String String

new Label name

Int32 Int32 Int32

The LCID to create the label for

Boolean Boolean Boolean

Whether this Label will be the default Label of The lcid


The new Label for the Term


The user does not have sufficient permission to perform this operation.

This operation is invalid in the orphaned terms TermSet. The operation failed.

The label will be created as a none default Label, and the name already exists for this lcid.

The label name is a null reference (Nothing in Visual Basic) or an empty string.

Call the M:Microsoft.SharePoint.Taxonomy.TermStore.CommitAll method to save this change to the database. is not valid.


The labelName value will be normailized to trim consecutive spaces into one and replace the & character with the wide character version of the character (\uFF06). It must be non-empty, cannot exceed 255 characters, and cannot contain any of the following characters ;"< >|&tab

The name of the Label object is case-insensitive. If the name to be created is a non-default Label, it cannot have the same name as any existing Label of The lcid. If it is to be created as a default, then it can have the same name as existing Label. Instead of creating a new label, the existing label will become the default Label for the LCID.

The current user must have TaxonomyRights.EditTerm permissions to use this method.

Applies to