SP.GroupCollection.add(parameters) Method

Applies to: SharePoint Foundation 2010

Adds a group to the collection of groups in a site collection.

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

Parameters

  • parameters
    A SP.GroupCreationInformation Class object that represents information associated with the group.

    It facilitates creation of a cross-site group

    It must not be null.

Type: SP.GroupCreationInformation

Return Value

Type: SP.Group

Applies To

SP.GroupCollection Class

Exceptions

Exceptions

Descriptions

SPException

The group description exceeds the maximum length. Error code: -2146232832.

SPException

The group collection type is not a site-level group collection. Error code: -2146232832.

SPException

The group owner is a role. Error code: -2146232832.

SPException

The group owner is a domain group. Error code: -2146232832.

SPException

The group collection is read-only. Error code: -2146232832.

SPException

The group owner is null. Error code: -2130575293.

SPException

The group name is empty or exceeds the maximum length. Error code: -2130575281.

SPException

The default user is a non null domain group. Error code: -2130575274.

SPException

The group quota has exceeded. Error code: -2130575260.

SPException

Another group with the same name is being added. Error code: -2130575169.

ArgumentException

The group owner is null. Error code: -2147024809.

ArgumentNullException

The group to be added is null. Error code: -2147467261.

UnauthorizedAccessException

The group description exceeds the maximum length. Error code: -2147024891.

See Also

Reference

SP.GroupCollection Methods

SP.GroupCollection Properties

SP Namespace