I concocted the following bit of code to automate the task of exporting project definitions to XPO files. It is a simple bit of code that allows the user to dump the project definition files to a specified folder.
Dynamics AX provides functions for parsing date strings into a date object but they are limited at best.
The following static method uses the .Net date parsing functionality to create a X++ date object from any valid date string without knowing the year, month, and day sequence or anything else about it for that matter.
It also allows you to specify the value that is returned in case of an invalid string being passed.
If you use any amount of CLRInterop programming in Dynamics AX you have probably at some point or another needed to use X++ code to interact with an array object passed back from a bit of CLR code.
I created the following static class to ease the process of converting a CLRArray object into a X++ style list object.
A common task associated with creating objects in Dynamics AX is giving them the ability to be packed into a container for storage as a SysLastValue entry.
The common methodology used for this is to declare a version and a list macro in the class declaration and to add the standard Pack and Unpack methods to your class. The problem with this standard methodology is that you must constantly update the version and list macros to add new parameters that you want to store. You then have to deal with the various issues related to tracking all of these version changes, and unpacking them accordingly.
I have developed a version independent method for automatically generating the packed class that makes code maintenance simplistic. The unpacking of the class is just as simple and isn’t subject to the issues associated with tracking packed class versions.
Welcome to my blog. Please check back often as I will be adding more content as soon as I get the site completely up and running.