Whitebeam Template Reference Documentation
Given an Individual or OU returns all the entities of which the target is a member.
dataArray = rb.contact.memberOf(container)
The 'memberOf' method takes 1 parameter:
|Name ||Type/Value ||Range/Length ||Description |
|container||number||positive integer > 0 ||Required. The ID of a valid Individual, OU, or Community.|
The 'memberOf' method returns an array of structure:
|Type/Value ||Range/Length ||Description |
Array of contact entities (Individuals. OUs and Communities) of which this contact entity is a member
As well as any OUs or Communities of which this entity is directly or indirectly a member, memberOf() will always return a record for the individual or OU itself. This is orthogonal with the validate() method and the security model under which an entity is a valid container of itself for authentication and validation purposes. This means that memberOf will always return at least one record, even for isolated individuals who have not been linked to any OU or community.
var friends = rb.contact.communityInfo(-1, "");
var members = rb.contact.memberOf(friends.ID);
for (var x in members)
rb.page.write(members[x].name+" is a member of "+friends.name+"<BR>");
(loadtime : 198ms)