With Dynamics 365 for Operations (AX7), every developer must work on their own machine and share the work with others using Visual Studio Team Services (VSTS). This article shows how one developer can update his or her development machine with the developments made or hotfixes installed by other developers. This approach can also be used for other development-type environments.
These instructions may be quite obvious to someone with VSTS/TFS experience, but may be useful for AX developers who have used other techniques for previous versions of AX.
The below assumes that the developments to copy over are checked into VSTS. If you need to bring over incomplete developments that cannot be checked in yet, use the shelveset feature instead. See https://www.visualstudio.com/en-us/docs/tfvc/suspend-your-work-manage-your-shelvesets for reference on this approach.
1. Make sure the author of the development has checked in their completed work to VSTS
2. Log on to the target development machine, start Visual Studio and make sure it’s properly configured to run against the correct VSTS team project.
I have written a separate blog post about this.
3. Open Source Control Explorer (from View menu or from the Team Explorer window on the right)
4. Right-click on the branch that contains the current developments (in the above screenshot, it would be Main) and choose Get latest Version
This will download the latest checked in version of all the source code, metadata, and development projects that are under version control.
Visual Studio will display a confirmation box after the download of the updates is completed.
5. Determine which application packages need recompiling
This step is needed as a preparation for the next one, to build only the packages that have changed and save some time.
The main idea is that each subfolder of the Metadata folder corresponds to a package and underneath each package folder there are folders for models.
Option 5A – view the changes since a specific point in time
This is useful if you only have a few updates to apply and you know when your system was last updated.
Right-click on the main branch again and choose View History. This will open the History window.
Find the changesets that were created after the desired point in time. Double-click on each changeset to see what’s in it.
From the screenshot, we see that the changeset has updated 2 packages: ApplicationSuite and ElectronicReporting. These are the packages that we need to rebuild.
Option 5B – view all models that are under version control
Have a look at the Metadata folder in Source Control Explorer. From the example above, we see that there are 2 packages under version control: ApplicationSuite and ElectronicReporting. These are the packages that we need to rebuild.
Option 5C – rebuild everything
You can always skip the above options and rebuild everything. It will just take more time.
From the Visual Studio main meu, choose Dynamics AX > Build models… and select the packages to rebuild.
In the Options tab, I also checked Synchronize Database as the updates may include data structure changes.
Now click Build, wait until it completes (be patient!) and verify that there are no errors in the Output or Error List windows.
7. All done
Test that the desired changes are now available in your AX UI.