CloneUserGroup Method
- Last UpdatedNov 06, 2025
- 1 minute read
The CloneUserGroup() method creates a new user group based on a specified existing user group, assigning the passed description to the new user group. This method also copies all of the user group link records from the source user group to the new user group. Therefore, all users in the source group are part of the new group. This method also copies the source group's entity access and privileges to the new group. The group ID of the new group is returned.
'Declaration
Public Shared Function CloneUserGroup( _
ByVal userGrpID As String, _
ByVal userGrpDescription As String _
) As Integer
public static int CloneUserGroup(
string userGrpID,
string userGrpDescription
)
Parameters
- userGrpID
- Required. Holds the ID of the source user group being cloned.
- userGrpDescription
- Required. Holds the description to be assigned to the new user group.
Return Value
Returns an integer value that is the group ID for the new user group created from the cloning. If there is an error and the new user group is not created, a -1 is returned.