SP.RoleDefinitionCollection.add(parameters) Method

Applies to: SharePoint Foundation 2010

Adds a new role definition to the collection based on the role definition information.

var value = SP.RoleDefinitionCollection.add(parameters);

Parameters

parameters

The information associated with the new role definition.

Type: SP.RoleDefinitionCreationInformation

Return Value

Type: SP.RoleDefinition

The new role definition.

Applies To

SP.RoleDefinitionCollection Class

Exceptions

  • SPException
    A role definition with the same characteristics already exists. Error code: -2130575293.

    -or-

    There are more than 1000 role definitions added to the same site. Error code: -2130575259.

  • ArgumentException
    The role definitions are uniquely defined for this website. Error code: - 2147024809

See Also

Reference

SP.RoleDefinitionCollection Methods

SP.RoleDefinitionCollection Properties

SP Namespace