Share via


CRMQuery Class

The CRMQuery class contains methods that you can use to manage queries. This object is appropriate for frequently used queries that span object types and queries that perform aggregation. However, because of the dynamic nature of queries, the methods in this class do not perform as well as executing retrieval methods directly against specific object types. Case sensitivity in queries is dependent on the SQL Collation configuration for your SQL Server database.

Note These methods use the Fetch XML syntax for specifying queries against the Microsoft CRM database. For more information about using Fetch XML, see Fetch XML schema.

There are no properties for this class.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Web.Services.Protocols.WebClientProtocol
            System.Web.Services.Protocols.HttpWebClientProtocol
               System.Web.Services.Protocols.SoapHttpClientProtocol
                  CRMQuery

[Visual Basic .NET]
Public Class CRMQuery
   Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
[C#]
public class CRMQuery : System.Web.Services.Protocols.SoapHttpClientProtocol
[C++]
public __gc class CRMQuery: public System.Web.Services.Protocols.SoapHttpClientProtocol

The CRMQuery class exposes the following methods.

Method Description
ColumnsById Returns the ColumnSet of a saved query.
Create Creates a new query.
CreateAndRetrieve Creates a new query and then retrieves it.
Delete Deletes a query.
ExecuteById Executes a query and returns the ResultSet and the ColumnSet for that query.
ExecuteQuery Executes a query in the Fetch XML format.
MakeAvailableToOrganization Grants read access to an organization and revokes previously granted read access rights for that organization.
MakeAvailableToTeams Grants read access to a list of teams and revokes previously granted read access rights for those teams.
ResultsById Executes a query and returns the ResultSet.
Retrieve Retrieves an existing query.
RetrieveByType Retrieves all of the queries that have the specified query return type, query type, and customizable flag value.
RetrievePublicQueriesByType Retrieves all of the public queries for the specified query return type.
RetrieveSharedTeams Retrieves the teams that have access to the specified query.
Update Updates the specified query.
UpdateAndRetrieve Updates the specified query and then retrieves it.

Requirements

Namespace: Microsoft.Crm.Platform.Proxy

Assembly: Microsoft.Crm.Platform.Proxy.dll

See Also

© 2005 Microsoft Corporation. All rights reserved.