Monthly Archives: July 2011
Last Weekday of Month
This method will calculate the date of the last specified weekday in the month of the given date. static date lastWeekdayOfMonth(date _date, WeekDays _weekday){ int _endWeekDay, _diff; date _endDate = endmth(_date); ; _endWeekDay = dayofwk(_endDate); _diff = _endWeekDay – _weekday; … Continue reading
Posted in AX 2009, AX 2012, AX 4.0, Microsoft Dynamics AX
Tagged Code Sample, Dates, X++
Comments Off
Calculating a File Hash
Some time ago a colleague presented me the task of computing a SHA256 hash for an output file. This hash would be stored in a table in a hexadecimal string format, along with the file info, to ensure that the … Continue reading
Posted in AX 4.0, Microsoft Dynamics AX
Tagged CLRInterop, Code Sample, File Hash, MD5, SHA, X++
Comments Off
Exporting Project Definitions
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.
Posted in AX 2009, AX 2012, AX 4.0, Microsoft Dynamics AX
Tagged Code Sample, Export, Project Definition, X++, XPO
Comments Off