Helpful TFS Queries for the Dynamics AX Developer

By David Boll | March 2, 2016

Helpful tfs queries for the dynamics ax developer

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

Recommended Reading:

Manage U.S. Use Tax on Purchase Orders in Dynamics 365 Finance and Operations

  Managing sales tax requirements on your business purchase can be complicated, but Dynamics 365 Finance and Operations can help […]

Read the Article
5.19.22 Dynamics CRM

How to Write a Great Support Ticket in the Stoneridge Support Portal

Submitting a support ticket through the Stoneridge Support Portal is a quick and effective way to get assistance for any […]

Read the Article

Managing Your Business Through Uncertain Times Using Dynamics 365 Finance and Operations

  Dynamics 365 Finance and Operations (F&O) can help you make informed decisions on how to move your business forward. […]

Read the Article
5.13.22 Power Platform

Using Power BI Object Level Security

  The following article will demonstrate how to use Power BI Object Level Security to disable column data based on […]

Read the Article
5.12.22 Dynamics CRM

How to Use the Stoneridge Support Portal

Stoneridge Software’s support portal is an intuitive and useful function that makes it easy for you to access resources to […]

Read the Article
5.6.22 Dynamics GP

Dynamics GP Transaction Removal: Purchase Orders

  Are you having performance issues with Purchase Orders?  Do you find that there are old Purchase Orders on your […]

Read the Article
5.5.22 Dynamics GP

The Real Story about the Long-Term Future of Dynamics GP Support

I’ve seen a number of people put forward comment that Dynamics GP is going away and you have to get […]

Read the Article

New Features in Dynamics 365 Business Central 2022 Wave 1 Release – Financial Enhancements

The Dynamics 365 Businses Central 2022 Wave 1 Release has a lot of new and exciting features to help your […]

Read the Article
4.29.22 Dynamics GP

Dynamics GP Transaction Removals: Bank Reconciliation

  This is part 2 of a 3 part series on Dynamics GP Transaction Removals. These quick tips will hopefully […]

Read the Article

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!