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


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!