Share via


RemoveMemberList Message

banner art

Removes a member from a list.

The relevant classes are specified in the following table.

Type Class
Request RemoveMemberListRequest
Response RemoveMemberListResponse
Entity list

Remarks

To perform this action, the caller must have access rights on the list (marketing list) entity instance. For a list of required privileges, see RemoveMemberList Privileges.

Example

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

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

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

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

// Set the ID of the list item to remove.
remove.EntityId = new Guid("2B951FBC-1C56-4430-B23B-20A1349068F3");

// Execute the request.
RemoveMemberListResponse removed = (RemoveMemberListResponse) 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 RemoveMemberListRequest()

' Set the ID of the list.
remove.ListId = New Guid("2B951FBC-1C56-4430-B23B-20A1349068F3")

' Set the ID of the list item to remove.
remove.EntityId = New Guid("2B951FBC-1C56-4430-B23B-20A1349068F3")

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

Related Topics

CrmService Messages

© 2007 Microsoft Corporation. All rights reserved.