Export (0) Print
Expand All

AddMembersTeam Message

CRM 1.2
banner art

Adds members to a team.

The relevant classes are specified in the following table.

Type Class
Request AddMembersTeamRequest
Response AddMembersTeamResponse
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 AddMembersTeam Privileges.

Example

The following code example demonstrates how to add a set of users to a team.

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

// Create the AddTeamMembersRequest object.
AddMembersTeamRequest addRequest  = new AddMembersTeamRequest();

// Set the AddTeamMembersRequest TeamID property to the object ID of 
// an existing team.
addRequest.TeamId = new Guid("9AF74EF9-A04C-DA11-A0C5-000D9DD8CDAC");

// Set the AddTeamMembersRequest MemberIds property to an 
// array of GUIDs that contains the object IDs of one or more
// system users.
addRequest.MemberIds =  new Guid[] {
            new Guid("C0165813-008E-4ADB-96A8-E4C5253D35E5"),
            new Guid("F127938A-A2E8-4C76-994B-1F981B6D11CA"),
            new Guid("A7847F46-3E3A-404F-B496-C6B2D8EC113B")};

// Execute the request.
AddMembersTeamResponse addResponse =
    (AddMembersTeamResponse)service.Execute(addRequest);
[Visual Basic .NET]
' Set up the CRM Service.
Dim service As New CrmService()
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create the AddTeamMembersRequest object.
Dim addRequest As AddMembersTeamRequest = New AddMembersTeamRequest

' Set the AddTeamMembersRequest TeamID property to the object ID of 
' an existing team.
addRequest.TeamId = New Guid("9AF74EF9-A04C-DA11-A0C5-000D9DD8CDAC")

' Set the AddTeamMembersRequest MemberIds property to an 
' array of GUIDs that contains the object IDs of one or more system 
' users.
addRequest.MemberIds = New Guid() {
              New Guid("C0165813-008E-4ADB-96A8-E4C5253D35E5"), _
              New Guid("F127938A-A2E8-4C76-994B-1F981B6D11CA"), 
              New Guid("A7847F46-3E3A-404F-B496-C6B2D8EC113B")}

' Execute the request.
Dim addResponse As AddMembersTeamResponse =
    CType(service.Execute(addRequest), AddMembersTeamResponse)

Related Topics

CrmService Messages


© 2007 Microsoft Corporation. All rights reserved.


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft