RemoveMemberList Message (CrmService)
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
| Works for all deployment types | Works online only |
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 use this message, pass an instance of the RemoveMemberListRequest class as the request parameter in the Execute method.
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.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0;
token.OrganizationName = "AdventureWorksCycle";
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
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 token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle"
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx"
service.CrmAuthenticationTokenValue = token
service.Credentials = System.Net.CredentialCache.DefaultCredentials
' Create the request object.
Dim remove As 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.
Dim removed As RemoveMemberListResponse = CType(service.Execute(remove), RemoveMemberListResponse)
See Also
Concepts
Reference
© 2010 Microsoft Corporation. All rights reserved.

