Share via


SP.RoleDefinitionCollection.getByName(name) Method

Applies to: SharePoint Foundation 2010

In this article
Return Value
Applies To
Remarks

Gets the role definition with the specified name.

var value = SP.RoleDefinitionCollection.getByName(name);

Parameters

  • name
    The name of the role definition.

Type: String

Return Value

Type: SP.RoleDefinition

The role definition.

Applies To

SP.RoleDefinitionCollection Class

Exceptions

  • SPException
    Cannot find a role definition by this name. Error code: -2146232832.
  • SPException
    name is null, empty or more than 255 characters. Error code: -2146232832.

Remarks

This method gets the role definition with the name specified by name in the collection.

See Also

Reference

SP.RoleDefinitionCollection Methods

SP.RoleDefinitionCollection Properties

SP Namespace