Newer Version Available
NetworkMemberGroup
Supported Calls
create(), describeSObjects(), query(), retrieve(), update()
Special Access Rules
This object is available only if Salesforce Communities are enabled in your org.
Fields
| Field Name | Details |
|---|---|
| AssignmentStatus |
|
| NetworkId |
|
| ParentId |
|
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 });