SavedQueryDataSource is a custom data source web control that provides entity records that a databound web control can bind to. The records are retrieved based on a system view in CRM. 

Using SavedQueryDataSource in a Page Template

The following control declaration can be added to an ASP.NET page template in the Visual Studio Web Application project. The following example bind a ASP.NET GridView control to the SavedQueryDataSource to render a grid listing contact records from CRM with the columns defined by the columns of the system view specified by the SavedQueryName property.

<crm:SavedQueryDataSource ID="ActiveContacts" SavedQueryName="Active Contacts" runat="server" />
<asp:GridView DataSourceID="ActiveContacts" runat="server" />

SavedQueryDataSource example

Properties

The SavedQueryDataSource control has the following properties that can be specified to modify the behavior.

NameDescription
SavedQueryName The name of a system view in CRM.