Del via


AddMembersTeamRequest Class

Definition

Contains the data that is needed to add members to a team.

public ref class AddMembersTeamRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class AddMembersTeamRequest : Microsoft.Xrm.Sdk.OrganizationRequest
[<System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")>]
type AddMembersTeamRequest = class
    inherit OrganizationRequest
Public NotInheritable Class AddMembersTeamRequest
Inherits OrganizationRequest
Inheritance
AddMembersTeamRequest
Attributes

Examples

The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface instance.

/// <summary>
/// Demonstrates AddMembersTeam message
/// </summary>
/// <param name="service">The authenticated IOrganizationService instance</param>
/// <param name="userIds">An array of IDs for the users you want to add to the team</param>
/// <param name="teamId">The ID of the team</param>
static void AddMembersTeamExample(IOrganizationService service,
      Guid[] userIds,
      Guid teamId)
{

      AddMembersTeamRequest request = new()
      {
         MemberIds = userIds,
         TeamId = teamId
      };

      service.Execute(request);
}

Remarks

For the Web API use the AddMembersTeam action.

Usage

Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of the AddMembersTeamResponse class.

Privileges and Access Rights

To perform this action, the caller must have privileges on the Team table and access rights on the specified record in the TeamId property.

Constructors

AddMembersTeamRequest()

Initializes a new instance of the AddMembersTeamRequest class.

Properties

ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
MemberIds

Gets or sets an array of IDs for the users you want to add to the team. Required.

Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId

Gets or sets the ID of the request. Optional.

(Inherited from OrganizationRequest)
RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
TeamId

Gets or sets the ID of the team. Required.

Applies to

See also