In TeamConnect, a group exists independently of its group account record, meaning that if you need to get or set any information for a group, you must use the group account. All TeamConnect users have their own group accounts (instances of GroupAccount) that include information such as the group display name and description. Use the GroupService class to access with groups in the API.
The API provides the following model interfaces for groups:
•The Group class, which contains the display name of the group. You can use this object to return the group name.
•The GroupAccount class, which contains all the fields for the group account in TeamConnect. You can use this object to get or set information for a user.
Because every display name is unique, the group name connects a group to its group account. When you create a new group, TeamConnect generates a key that you can also use to identify the group. Use the entity.getPrimaryKey method if you want to identify the group with its key.
Because group rights determine the code you can run, it is sometimes necessary to check whether the current user is part of a group. You can get the current user using the UtilityService.getCurrentUser() method.
Refer to the GroupService samples for examples of working with groups in the API.