Think Outside of the Box by Using X++ to Document Your Feature

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

One of the extremely import tasks of development is to document what you have created.  This can include things such as comments within the code, but there are times you need more than that.   If you have created a rather complex piece of functionality (this could be anything from changing posting routine code to creating a custom module), you may be tasked with updating it at a later date (or you may inherit the code as well).  If this date is a couple of years AFTER the code has been deployed, will you remember what you were thinking when you designed the code?  Probably not.

Creating this type of documentation can be a bit of a tedious process, especially if you were not given a proper functional design document to create the feature.  Something to consider then is to create tools to help automate the process.

Dynamics AX has had the ability to work with Excel and Word for many versions, so why not utilize that functionality to create a document for your customization?  Utilize the built-in formatting commands to make the document have a standard format.  Here is some example code (it is not complete as it does not contain some macro definition code):

This document will contain (in the very least in the object listing section) a list of objects that exist in the above mentioned project and the above mentioned Model.  Certain types of objects will have additional information.’);

OK, so that gives you a header, but what about the rest?  X++ has a construct called TreeNode().  You can use this to traverse your project, and update your document with any pertinent information you desire to pull from the metadata.   The dict* kernel classes can be a huge help in doing this as you can use those objects to pull property values, X++ code, etc. for your documentation.

A little snippet demonstrating part of this:

Once your tool does the ‘heavy lifting’, you can go in and add additional pertinent information, thoughts, etc. on the specific feature.

It is not a trivial effort to create the toolset to do this, but once created, it can be re-used as a real time saving device.

Related Posts

0 Comments

Submit a Comment

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

Upcoming Events

december

02dec9:00 am12:00 pmOnline Workshop - Dynamics GP Year End Close (Morning Session)

03dec11:00 am12:00 pmConfab with Stoneridge - Livestream: Live Agents, Power Virtual Agents, Omnichannel – Oh My!

03dec1:00 pm4:00 pmOnline Workshop - Dynamics GP Year End Close (Afternoon Session)

09dec10:00 am10:30 amThe Modern Manufacturer - Manufacturing Policy Management

17dec11:00 am12:00 pmConfab with Stoneridge - Livestream - Technology in 2020: A Year in Review

january

06jan10:00 am10:30 amThe Modern Manufacturer - MRP v MPS – What, When and How

14jan11:00 am12:00 pmConfab with Stoneridge - Livestream - Looking Forward: Predictions for Technology in 2021

20jan10:00 am10:30 amThe Modern Manufacturer - Demand Forecasting Functionality

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