Going Beyond Advanced Find, Views, and XRMToolbox: Using View Designer and FetchXML Builder with Dynamics CRM

by | Updated June 27, 2018 | Dynamics CRM

In part one of this topic, we discussed using the “FetchXML Tester” in the XRMToolbox to type in and test FetchXML, beyond what the Advanced Find in CRM is able to generate.  In this article, we will discuss a couple of other tools within the XRM toolbox that will let you create FetchXML apart from what the Advanced Find can do, and deploy this new query to a View in CRM.

We’ll discuss using View Designer and FetchXML Builder in Dynamics CRM.

View Designer

The View Designer allows you to connect to your CRM instance and download the current FetchXML that is utilized by a view within CRM.  In my example from Part 1, I needed to get a customer’s view called “All Opportunities Without an Open Activity” working properly.

NOTE:  It is important to remember that you will have to create the view you would like to customize in CRM before you use the “View Designer”.  In addition, it would not be advisable to update the out of the box views that come with CRM.

In the “View Designer” click Open.

Beyond Advanced Find

Select the entity associated with the view you wish to update.  This will populate the “View” pulldown allowing you to select the view you wish to update.

Beyond Advanced Find

After you select the view, you will see the XML of the grid associated with the view (columns, column sizes, etc).  Click OK on the Select View form and we will be able to start working with this View.

Some of the buttons on the “View Designer”:

  1. Live Preview – clicking this will fetch the data returned by the view and display it
  2. Select Columns – allows selection of the attributes in the FetchXML query and display the data as columns in your grid
  3. Edit XML – edit the grid associated with the view
  4. Edit Query – Edit the FetchXML associated with the view. This actually opens up a new tab with the “FetchXML Builder”
  5. Save – save your changes
  6. Publish – publish your view changes to your CRM org

In this example, we are going to want to update the FetchXML so we are going to click on Edit Query and add our FetchXML from Part 1.

Beyond Advanced Find

FetchXML Builder

The Edit Query button will open the “FetxhXML Builder” tab as you can see below.  “FetchXML Builder” is another tool that allows you to update or create FetchXML queries much like the “FetchXRM Tester” that we discussed in the first part of this series.

Beyond Advanced Find

This tool gives a few more options on how to create your query.  If you don’t like (or don’t feel comfortable) just typing in your FetchXML query like we did previously you can use the panel on the left to create or update your query.

Right-clicking on the various lines in the Query Builder panel gives you options on what you can add to your query.  For example, if you want to add another attribute to your query you can:

  1. Right click on the entity that contains the data you want to add
  2. Select Add
  3. Then select attribute

Beyond Advanced Find

4. In the Attribute Name field select the attribute to add

Beyond Advanced Find

5. Then click OK in the lower right-hand corner to see your attribute added to the FetchXML window.


  1. Right Click on the entity that contains the data you want to add
  2. Choose “Select Attributes”
  3. From the list shown, select the attributes that you want to add to the FetchXML.

Beyond Advanced Find

4. Click OK to see your selections added to the FetchXML

As you can see, the Query Builder has many options to help you with your fetch syntax and it is worth playing around with to see what it can do.

In our example, we already have the FetchXML that we want to use in the CRM view so instead of using the Query Builder pane, we are just going to paste our query into the “FetchXML Builder”.  To do this we are going to have to view the XML.  To do this click the “View” button and select FetchXML from the pulldown.

Beyond Advanced Find

This will open the FetchXML view.  All we have to do now is paste our query from Part 1 and click OK in the bottom right-hand corner.  The query builder will update to reflect the new XML.

Beyond Advanced Find

At this point, we can click “Execute” and test our query to make sure we get the results we are expecting.  Once we are satisfied with our query, we would like to get these changes back to the “View Designer”.  This is one button click away with the “Return FetchXML” button.

Beyond Advanced Find

This moves our query changes to the “View Designer” tab and sets our focus back in the “View Designer”.  You can click “Live Preview” to confirm your query changes.

Moving the query changes to your view in CRM is very easy at this point.

  1. Click Save
  2. Click Publish

This will move your FetchXML to the view that you have selected within your CRM org.  You now have a view utilizing an outer join and retrieving Opportunites without an open Activity.

Beyond Advanced Find

If you’d like to learn more about extending your CRM instance through these tools, let us know!

Related Posts

1 Comment

  1. Brian Hudson

    It’s worth noting that you cannot join with a custom entity and get attributes from it to display in the View. The error is: Could not find relationship for related entity field ab.abc_splitpercent specified in layoutxml.

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events


01sep10:00 am10:30 amEnsuring Quality and Compliance for Batch Manufacturers in Life Sciences

01sep12:00 pm12:30 pmIs it Worth It to Move to the Cloud? A Look at Considerations for Current Agribusinesses Using Dynamics GP

01sep2:00 pm2:45 pmWhat’s New in Dynamics 365 Finance and Supply Chain

09sep11:00 am12:00 pmConfab Live with Stoneridge – Data Strategy and Reporting – Mining Decision Making Insights

15sep10:00 am11:00 amSolving the Biggest Challenges in Agribusiness Through Innovation and Technology

22sep12:00 am12:30 pmSimplifying Payroll and HR Management with ADP Workforce Now

22sep10:00 am10:30 amStreamlining Batch Manufacturing with Technology

22sep2:00 pm2:30 pmProcess Automation for Microsoft Dynamics D365 for Business Central, Finance and Operations and GP

23sep11:00 am12:00 pmConfab LIVE with Stoneridge - Riding the Wave 2 Release – Key Features Coming to Dynamics 365 this October

29sep10:00 am11:00 amTop Five Reasons Why NOW is the Right Time to Move from Salesforce to Dynamics 365 Customer Engagement

29sep12:00 pm12:45 pmUnderstanding Job Costing and Tax Management in Business Central

29sep2:00 pm3:00 pmDigitalizing Horticulture & Agriculture - How to Sell Plants Online and Simplify Business Management

30sep12:00 pm4:00 pmSecurity and Permissions Training for D365 Business Central or Dynamics NAV


06oct10:00 am10:30 amPreview of D365 Business Central Fall Release Features and Functionality

06oct12:00 pm12:30 pmInsider's Guide to New Features Available in the Fall Release of D365 Finance and Supply Chain

07oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Technical

21oct11:00 am12:00 pmConfab LIVE with Stoneridge - Dataverse and Dynamics in Review – Let’s Get Functional

26oct(oct 26)9:00 am28(oct 28)5:00 pmStoneridge Connect Leadership and Community Conference

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!