Retrieve a Visualization (Chart)

Retrieve a Visualization (Chart)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

The following code example shows how to retrieve a saved query visualization (chart). For a complete sample demonstrating how to create a chart, see Sample Code: Create a Chart.


The following code shows how to retrieve a visualization (chart) attached to a view.

// Set the GUID of the My Open Opportunities view.
Guid viewid = new Guid("{00000000-0000-0000-00AA-000010003000}");

// Create a query for retrieving all visualizations (charts) attached to a view.
QueryExpression qe = new QueryExpression();
ConditionExpression filter = new ConditionExpression();
filter.AttributeName = "savedqueryid";
qe.EntityName = "savedqueryvisualization";
filter.Operator = ConditionOperator.Like;
filter.Values = new object[] { viewid.ToString() };
FilterExpression fltrExp = new FilterExpression();
fltrExp.Conditions = new ConditionExpression[] { filter };
qe.ColumnSet = new AllColumns();
qe.Criteria = fltrExp;

// Retrieve a collection of visualizations (charts) attached to the view.
BusinessEntityCollection viz = proxy.RetrieveMultiple(qe);

See Also



Other Resources

© 2010 Microsoft Corporation. All rights reserved.

© 2015 Microsoft