RemoveMembersTeam Message

banner art

Removes members from a team.

The relevant classes are specified in the following table.

Type Class
Request RemoveMembersTeamRequest
Response RemoveMembersTeamResponse
Entity team

Remarks

To perform this action, the caller must have access rights on the entity instance specified in the request class. For a list of required privileges, see RemoveMembersTeam Privileges.

Example

The following code example shows how to use the RemoveMembersTeam message.

[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the request object.
RemoveMembersTeamRequest remove = new RemoveMembersTeamRequest();

// Set the ID of the team.
remove.TeamId = new Guid("18ECA720-493E-4800-BBFD-638BD54EB325");

// Set the IDs of the members to remove.
remove.MemberIds = new Guid[] {new Guid("2B951FBC-1C56-4430-B23B-20A1349068F3"), new Guid("3A951GCD-2D56-4431-B23B-21B1349068G4")};

// Execute the request.
RemoveMembersTeamResponse removed = (RemoveMembersTeamResponse) service.Execute(remove);

[Visual Basic .NET]
' Set up the CRM Service.
Dim service As New CrmService()
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the request object.
Dim remove As RemoveMembersTeamRequestt()

' Set the ID of the team.
remove.TeamId = New Guid("18ECA720-493E-4800-BBFD-638BD54EB325")

' Set the IDs of the members to remove
remove.MemberIds = {New Guid("2B951FBC-1C56-4430-B23B-20A1349068F3"), New Guid("3A951GCD-2D56-4431-B23B-21B1349068G4")}

' Execute the request.
Dim removed As RemoveMembersTeamResponse = CType(service.Execute(remove), RemoveMembersTeamResponse)

Related Topics

CrmService Messages

© 2007 Microsoft Corporation. All rights reserved.