This documentation is archived and is not being maintained.

QualifyMemberList Message (CrmService)

Forefront
banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Works for all deployment typesWorks online and offline

Qualifies the specified member list and either overrides the list members or removes them according to the specified option.

The relevant classes are specified in the following table.

TypeClass
RequestQualifyMemberListRequest
ResponseQualifyMemberListResponse
Entitylist

Remarks

To use this message, pass an instance of the QualifyMemberListRequest class as the request parameter in the Execute method.

Qualify means to evaluate which members to keep in the list. You create the set of members to evaluate by first doing a query of some kind. For example, you might search for members that are in a particular zip code. This message is invoked using Manage Members in the Web application.

To perform this action the caller must have access rights on the entity instances retrieved. For a list of required privileges, see QualifyMemberList Privileges.

Example

The following code example shows how to use the QualifyMemberList 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;

// Store the ID for the account in order to validate the results.
Guid verificationAccountId = new Guid("1DCDEE97-35BB-44BE-8353-58BC36592656");

// Create a request to qualify members in the list.
// In this sample, the request will replace the existing list with the just the Trey Research account
QualifyMemberListRequest qualifyListRequest = new QualifyMemberListRequest();
qualifyListRequest.ListId = new Guid("d0aad70e-62c8-dc11-8514-0003ffafd2c7");
qualifyListRequest.MembersId = new Guid[] { verificationAccountId };

// Set to override all current members of the list with members from the query result.
qualifyListRequest.OverrideorRemove = OVERRIDE;

// Execute the request.
service.Execute(qualifyListRequest);
[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

' Store the ID for the Trey Research account in order to validate QualifyMemberList results
Dim verificationAccountId As Guid = Guid.Empty
verificationAccountId = New Guid("A8228F55-A868-DC11-9F6D-0003FFA48E24")

' Create a request to qualify members in the list.
' In this sample, the request will replace the existing list with the just the Trey Research account.
Dim qualifyListRequest As New QualifyMemberListRequest()
qualifyListRequest.ListId = New Guid("d0aad70e-62c8-dc11-8514-0003ffafd2c7")
qualifyListRequest.MembersId = New Guid(){ verificationAccountId }

' Set to override all current members of the list with members from the query result.
qualifyListRequest.OverrideorRemove = OVERRIDE

' Execute the request.
service.Execute(qualifyListRequest)

See Also

Concepts

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show: