Skip to content
CA Service Management - 17.1
Documentation powered by DocOps

Group Management Methods

Last update June 5, 2014

This article contains the following topics:

This section explains the Web Services Group Management Methods.

addMemberToGroup

The following parameters apply to the addMemberToGroup method:

Parameter Type Description
SID Integer Identifies the session retrieved from logging in.
ContactHandle String Identifies the handle of the contact to add as a member.
GroupHandle String Identifies the group to which you will add the contact.

Description

Adds a contact to a group. Nothing happens if the contact is already a member.

Returns

Nothing.

removeMemberFromGroup

The following parameters apply to the remove MemberFromGroup method:

Parameter Type Description
SID Integer Identifies the session retrieved from logging in.
ContactHandle String Identifies the handle of the contact to remove.
GroupHandle String Identifies the group from which you will remove the contact.

Description

Removes a contact from a group. Nothing happens if the contact is not a member.

Returns

Nothing.

getGroupMemberListValues

The following parameters apply to the getGroupMemberListValues method:

Parameter Type Description
SID Integer Identifies the session retrieved from logging in.
whereClause String Identifies the SQL where clause.
numToFetch Integer Determines the maximum number of records to return. This cannot be zero (0). Use ‘1’ to return all.
attributes String[] Identifies the array of attribute names for which to retrieve values.

Description

Functions similarly to getListValues(), except that it queries the system’s group and member relationships. The system uses a special ‘Group Member’ (grpmem) object for each group/member relationship. The CA SDM system administers grpmem objects behind the scenes (you do not manipulate them directly), and they are essential for certain queries.

The grpmem object simply contains two pointers, one to a Contact and the other to a Group, which in itself is a Contact object. The attribute names are ‘member’ and ‘group’, respectively. Because these are pointers, you must use dot-notation to form a query as normal. For example, to find all Contacts with a last name beginning with ‘B’ and in a group with the name, “Seattle”, you would use the following:

member.last_name LIKE 'B%' AND group.last_name = 'Seattle'

You may also use handles as normal, illustrated by the following:

member.last_name LIKE 'A%' AND group.id = U'555A043EDDB36D4F97524F2496B35E75'

It is important to note that this method can retrieve values from all members and groups, not just a single group. To simply get information about all the members of a specific group or member, just specify a handle in the where clause. For example, the following would retrieve values from a specific group:

group.id = U'555A043EDDB36D4F97524F2496B35E75'

The following concepts are important to remember:

  • grpmem object contains two pointer attributes, one is to member and the other is to group
  • grpmem object exists for each group/member relationship

The grpmem method actually queries the grpmem object table, thereby returning an object representing a relationship between two contacts. Therefore, the attribute values you want to fetch in attributes must use dot-notation from the grpmem object. To fetch values from the member, all your attribute names should be of the form, ‘member.ATTRNAME’, as illustrated by the following example:

'member.last_name'

To fetch values from the group, use ‘group.ATTRNAME’.

Note: For an example of efficient querying of groups and members, see Where Clauses.

Returns

Automatically returns no handles. The <Handle> element in the return is always empty. To request the member or group handle for each row, use one of the following in the attributes parameter described in the table.

  • “member.persistent_id”
  • “group.persistent_id”
XML Element Type Description
<UDSObjectList> N/A Identifies the outer element, which contains an array of <UDSObject> elements. Each object is really a grpmem object.
Was this helpful?

Please log in to post comments.

  1. Abdul Muqsith Imran Mohammed
    2018-05-15 05:08

    From

    numToFetch Integer Determines the maximum number of records to return. This cannot be zero (0). Use ‘1’ to return all.

    to

    numToFetch Integer Determines the maximum number of records to return. This cannot be zero (0). Use ‘-1’ to return all.

    -1 is used to return all. Please correct the above line