Version Control in Dynamics AX: Ensure that code changes are being made in model tied to version control

by | Updated April 11, 2017 | Development, Dynamics AX

Recently we ran into an issue where code changes were made in a model that was not tied to version control. When it came time to create a new build these changes weren’t included when the version control sync was executed. We had to take the time to move all of this code from one model to another and restart the build process. After this situation occurred a couple of times I decided to try to find a solution to help prevent this.

What I did was make a change to the class SysVersionControlSystem. This addition takes the version control folders from the XML definition file and compares them to the current model when AX is opened. If the current model doesn’t match a folder tied to version control it will return an error stating to change the model before making code changes. If this message does come up it is best to change the startup model in Tools – Options in the development tab. This is a pretty simple solution but could end up saving a lot of time if code changes are ever made in the incorrect model. It will also catch if a developer opens AX in a layer that is not tied to version control. Code screen shots are below.

NOTE: This was tested using Team Foundation Server. I did not test with Source depot or Visual SourceSafe but think it should work with them. I don’t think this would work with MorphX VCS since it uses AX database tables and doesn’t have a local repository folder.

Code review:
Created new method called ssi_ValidateCurrentModel. In method createModelsMap added call to new method (shown in first screenshot at end of method)

 

Related Posts

0 Comments

Submit a Comment

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

Upcoming Events

october

07oct12:00 pm1:00 pmThe Three Paths to Business Central from Dynamics GP

08oct11:00 am12:00 pmConfab with Stoneridge - Livestream - The Vision and Strategy of Microsoft Business Systems

14oct10:00 am10:30 amThe Modern Manufacturer - Managing Complex Cost Modeling

14oct12:00 pm12:30 pmGenerating Custom Inspection or Process Forms

19octAll Day22Stoneridge Connect Fall 2020

22oct11:00 am12:00 pmConfab with Stoneridge - Livestream - Stoneridge Connect Recap

28oct10:00 am10:30 amThe Modern Manufacturer - Engineering Change Management: Introduction of NEW Functionality for Manufacturers Using Dynamics 365

november

11nov10:00 am10:30 amThe Modern Manufacturer - Tears and Trauma of MRP

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!

X