AX and TFS in Daily Development Activities

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

I’m often asked how TFS and AX work together.  Usually the questions come from .NET developers new to AX, but familiar with TFS.  With those questions in mind, this article describes some common activities using the version control functions of TFS within AX.

To check new objects into TFS:

  1. If the object exists and you have not modified the object, modify it first.  If the object is a completely custom object, create it first.

By default objects do not exist in version control.  For example, objects that exist only in the sys and syp layers would not be checked into TFS because they can be recreated simply by reinstalling AX.  Version control is for tracking changes to customizations made to existing objects or for completely custom objects.

  1. In the AOT right-click on the object and choose Add to Version Control
  2. Once you have a collection of objects ready for check-in, in the AOT go to Version control > Pending Objects and check-in the objects in the list

-When objects are added to version control, xpos are created for the objects and saved into the local repository on the developer’s machine.

-When the objects are checked into version control, the xpos in the local repository are copied up to the central shared TFS repository.


Pending Objects


  1. In the form where you check in the objects there is a Work Items tab.

-Enter in the ID of the TFS task to tie this check-in to and in TFS’s Sharepoint site in this history for the task you’ll see your check-in against the task and you will see the individual objects that were checked-in.


Check In


To check out objects previously added to version control:

  1. In the AOT right-click on the object and choose Check Out
  2. Make your changes to the object
  3. Click on Version control > Pending Objects and check-in the objects in the list

-Once one developer has an object checked out, another developer will not be allowed to check out that same object


To view the history of an object:

  1. Right-click on the object and choose History
  2. In the form that opens you can select a version from the list and click the Get button to import that version of the object into your AOT.
  3. In the form that opens you can click the View file button to open the xpo for a particular version of the file

History Version1


To synchronize to changes checked into the central repository by yourself or other developers:

  1. Click on Version control > Synchronize
  2. In the dialog that opens mark the Force checkbox and click OK.

-This will force version control to overwrite any changes you’ve made to objects in your local AOT that aren’t checked out or under version


  1. In the form that opens, mark the model you want to synchronize to.

-When you synchronize to the central repository all of the xpos that have been checked in since the last time a sync was executed on the machine, are copied from the central repository to the local repository.

-Once the xpos exist in the local repository they are imported into AX and a database synch and compile are performed for those imported objects.


To check out the label file and add new labels to it:

  1. Click on Tools > Labels > Label editor
  2. The label editor form will open and at the top click on the Get Latest button to ensure you have the latest copy of the label file.
  3. At the top of the label editor form click the check-out button to check out the label file.
  4. To create a new label, in the label editor form, click the New button and save the label.
  5. The label will be given a temporary label id like $@ABC123.  Use the temporary label id in your code that uses the label.
  6. Once the labels have been created, click Version control > Pending objects and check-in the objects in the list.  (The label file will be one of the objects.)
  7. When you check in the label file, a permanent label id will be assigned to each new label.

-If the code you have that uses those labels is still checked out or is being checked in with the label file, the temporary labels will be automatically replaced with the permanent label id.

-If the code you have that uses those labels is not checked out, after the label file is checked in and the permanent label ids are known, you’ll have to go through your code, check out the objects, and manually change the code to use the permanent label id.



Related Posts


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!