Newer Version Available

This content describes an older version of this product. View Latest

NetworkMemberGroup

Represents a group of members in a community. Members can be either users in your internal organization or external users assigned portal profiles. An administrator adds members to a community by adding a profile or a permission set, and any user with the profile or permission set becomes a member of the community. This object is available in API version 26.0 and later.

If a Chatter customer (from a customer group) is assigned a permission set that is also associated with a community, the Chatter customer won’t be added to the community.

Prior to API version 27.0, this object was called NetworkProfile.

Note

Supported Calls

create(), describeSObjects(), query(), retrieve(), update()

The upsert() call is not supported for this object.

Note

Special Access Rules

This object is available only if Salesforce Communities are enabled in your org.

Fields

Field Name Details
AssignmentStatus
Type
picklist
Properties
Defaulted on create, Filter, Group, Restricted picklist, Sort, Update
Description
The status of a profile or permission set within a community. Values are:
  • Added—Users with this profile or permission set are members of the community.
  • Waiting for Add—The profile or permission set was added to the community, but the async process hasn’t completed yet. After the process is complete, the status is updated to Added.
  • Waiting for Remove—Use this status to remove all the community members belonging to a profile or permission set and remove a profile or permission set from a community.
NetworkId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The ID of the community that this group of members is associated with.
ParentId
Type
reference
Properties
Create, Filter, Group, Sort
Description
The ID of the profile or permission set associated with the community.

Usage

Use this object to view the profiles or permission sets associated with a particular community. Profiles and permission sets are added and removed asynchronously, so you can also check the status of a profile or permission set that was updated in a community.

If you have “Modify All Data,” “View All Data,” or “Create and Set Up Communities,” you can view all profiles or permission sets for any community in the organization, regardless of your membership. If you have “Modify All Data” or “Create and Set Up Communities,” you can also add profiles or permission sets. Users without these permissions can only find profiles and permission sets for communities that they’re members of.

Sample Code

1// Create a new NetworkMemberGroup with a profile as the ParentId
2NetworkMemberGroup nmgInsert = new NetworkMemberGroup();
3nmg.setNetworkId("0DBD0000000029o");
4nmg.setParentId("00eD0000000z1Ww");
5SaveResult[] results = connection.create(new SObject[] { nmgInsert });
6
7// Update an existing NetworkMemberGroup to be removed from the Network
8NetworkMemberGroup nmgUpdate = new NetworkMemberGroup(); 
9nmg.setId("0DLD000000003enOAA"); 
10nmg.setAssignmentStatus("WaitingForRemove"); 
11SaveResult[] results = connection.update(new SObject[] { nmgUpdate });