Helpful TFS Queries for the Dynamics AX Developer

by | Updated August 15, 2016 | Development, Dynamics AX

TFS can be a wonderful tool for the Dynamics AX Developer to help track bugs, tasks, etc. If it is used correctly, it can greatly increase your productivity. To learn more about the setup and use of TFS Code Repository and Dynamics AX see this post.

Disclaimer #1: I will not be writing on the Source Control functionality of TFS in this blog).

Disclaimer #2: I will not be writing on the Source Control functionality of TFS into AX. If you would like, you can find more information on this topic in this post: AX and TFS in Daily Development Activities


The most helpful thing you’ll need is queries. Lots and lots of queries. Queries will be your lifeline into TFS. In practice, I have a plethora of queries I create at the start of the project. Here is a list of a few of the ones you may want to consider as well:

“Tasks for Sprint X”:  I create a query for each Sprint “All DEV Tasks” “Active Bugs” “Resolved Bugs” “All Bugs” “My Sprint Work Items” “Change Request for DEV” (If your organization uses Features instead of Tasks, just change the wording above.)

If you haven’t created a query in TFS before it is pretty simple.

Microsoft Visual Studio


Make sure you are in the Work Items area. From there simply click the New Query button and you will be presented with screen above. Now it is just a matter of filtering down your results.

Here are a couple of examples of queries:

All Bugs

Query in Dynamics AX

Active Bugs

Query in Dynamics AX

All FDDs

Query in Dynamics AX

This query is a bit more interesting as you can see that TFS allows us to group criteria together. To accomplish this, simply select all the rows you want to group, right-click, and select “Group Clauses”.

Once you have created your queries, simply click the “Save Query” button and put it wherever it belongs. You will notice in the Save dialog that there are two main folders you can save your queries. A “My Queries” folder and a “Shared Queries” folder. As it implies, the “My Queries” folder only you have access to. The “Shared Queries” folder is shared among all TFS users. This is a nice place to put a majority of these queries so that everyone can easily see them.

The other thing you may notice is that by default there is a “My Work Items” query in the “Shared Queries” folder. This query will show you everything that is currently assigned to you.

Queries in Dynamics AX

First, notice it uses the keyword @Me. This indicates the current logged in user. As such, you should be very wary of changing this query as it will affect everyone. To get around this, I create a “My Sprint Work Items” query. It essentially is a copy of the “My Work Items” query with a few other pieces added in.

Dynamics AX Query

You can see that I’ve added the “Assigned To” to be myself (you could leave it as @Me as well though) and I’ve added a filter on the Iteration Path (aka current Sprint/workflow, etc). Feel free to personalize this one as much as necessary. The important part of this query is that it will not be saved in the “Shared Queries” category, but in the “My Queries” folder instead.

Now that you have created all your queries, all of the wonderful data housed in TFS is easily at your fingertips. Simply double click on a query and up comes your results set. From here you can sort, add columns, filter to your hearts content!

Hopefully, you can see the usefulness of all of this. As you go through the project you can easily find bugs and the given state of a bug, FDD/Tasks become easier to track, and finding your work is easier than ever.


Related Posts



  1. TFS Code Repository and Dynamics AX | Stoneridge Software Inc - […] For more information on TFS queries for the Dynamics AX Developer check out my previous blog. […]

Submit a Comment

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

Upcoming Events


14jan11:00 am12:00 pmConfab with Stoneridge - Livestream - Looking Forward: Predictions for Technology in 2021

20jan10:00 am10:30 amThe Modern Manufacturer - Demand Forecasting Functionality

27jan12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 1 – Fit

28jan11:00 am12:00 pmConfab with Stoneridge - Livestream - Ask the Experts!


03feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 2 – Platform

10feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 3 – Implementation Partner

11feb11:00 am12:00 pmConfab with Stoneridge - Livestream - Live Agents, Power Virtual Agents, Omnichannel – Oh My!

16feb12:00 pm12:45 pmFour Keys to Choosing the Best ERP or CRM Solution: Part 4 – Cost

25feb11:00 am12:00 pmConfab with Stoneridge - Livestream - Surfing Through the Dynamics 365 Wave 1 2021 Release

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!