Monday 28 April 2008

Inside Microsoft Dynamics AX 4.0 free e-book

Harish Mohanbabu was kind enough - per proxy qua his blog - to bring to my attention that MS has release a free e-book edition of Inside Microsoft Dynamics AX 4.0 here as a pdf. I quite like the book as it serves both as an introduction to general X++ development and as a reference guide for more specific programming problems.

Friday 18 April 2008

Applying agile software development to Dynamics AX development part I

Ever since I wrote my thesis at university, I've pondered the fine art of software development methodologies. During my last year at the University of Southern Denmark I "shopped around" and followed a myriad of software related courses, e.g. Agile software development, User-centered software development, and other iterative and waterfall based software development processes. These development methodologies all have ther merits and flaws, which will be well known to any software developer and the process of merging business processes and software development processes is notoriously difficult, though it is of the utmost importance in order to achieve the best results, business- and softwarewise.

The courses I followed at university were mainly concered with the whole development process(es) from early conceptualization to post-installation maintenance, including GUI-development and Business Intelligence reports. Therefore when I started developing (or should I say customizing -a point to which I will return later) Dynamics AX for customers, my craze - User-Centered Design - slowly fell to the background. Is customizing an ERP-programme, such as Dynamics AX, merely a question of replicating exsisting business processes, with some optimization, and merging them into a new ERP-application or is the development of an ERP-solution an almost god given chance to take a critical bird's eye view of the whole organization and try to optimize business processes all the way r0und? The latter would seem the obvious answer but this again begs another question, viz.: can business processes be optimized isolated from the software development process, when the software has a central place in today's organizations? No. Of course it cannot.

All to rarely is there any substantial software development theory included in the business development plan for the implementation of a ERP-system. Traditional user-experience studies / examinations are left behind, because the UI is developed for us, as part of the standard application in the Dynamics-series, and it is 'just' (I know I'm a bit hard here - but I'm trying to get my point through) a question of rearranging data-presentation, based on the customer's prior ERP-system or an external system. All too often does the customer say something like 'that's not the way it was in the other system' when confronted with an newer version of, lets say Dynamics AX.

So the big question is: how do we - as software developers and business consultants - merge the two worlds and come-up with a process which will lead to sound business optimization and software development integrity?

Friday 11 April 2008

More new stuff from Dynamics AX 2009 - Developer Documentation improvements

During the week I had some more time for myself and my Dynamics AX 2009 CTP3. I've dived into the depths of the developer side of the CTP a bit more and discovered many new things and improvement compated to the previous versions. I looked at version control breifly in a previous post which I am looking forward to seeing in action when multiple developers are working on the same installation at the same time.

When browsing through the tables I found a new entity on the property of the table, DeveloperDocumentation which at first sight appears just to be a simple label. But the truth is much more interesting which became clear when I found a new node in the Add-in node of e.g. InventTable. DeveloperDocumentation is referenced to - it appears - the Dynamics AX SDK, which can be found online. Though it exsisted in 4.0 and 3.0 for that case, in 2009 it is wastly more elaborate. In Dynamics AX 2009 it is integrated in the MorphX IDE, as developers might recognize from other IDE's - Visual Studio etc. Yes - I know that AX developers might have gotten used to having the SDK open in a browser window next to Dynamics AX, but once again the consolidation of development envirionments, which was set forth in a MS road-map earlier, shines through, and I like it. The developer documentation was available in earlier versions of AX but the most commen result was "There is no information on the topic". The developer documentation in 2009 pretty much provides the information which is available from the online SDK but is updated and streamlined with e.g. Visual Studio's SDK, which - as you might know - also can be accessed from within the studio itself. The developer documentation node is also available for other elements in the AOT - classes, EDTs - just in case you were wondering.

Tuesday 8 April 2008

Import items into InventTable and associated tables

Yesterday I needed to import item data into a company for testing purposes, so I wrote a small job which reads an csv-file containing itemId and itemName and creates the posts in InventTable and its associated tables, InventTableModule and InventItemLocation

static void InventTableImport(Args _args)

{
//
//Author : Steffen Denize
//Purpose : Demonstration for importing InventTable into Dynamics AX
//
InventTable inventTable;
CommaIO inFile;
Filename filename;
Dialog dialog;
DialogField dialogField;
ItemId itemId;
int counter;
InventTableModule inventTableModuleBuf;
InventItemLocation inventItemLocationBuf;
ItemName itemName;
;

//
// Note - In this example, I have used 'Dialog' & DialogField classes
// as a tool for me to select the file that has to be imported.
//
dialog = new Dialog("Demo of import of items into a blank InvenTable");
dialogfield = dialog.addField(typeid(Filenameopen), "File Name");
dialog.run();

if (dialog.run())
{
filename = (dialogfield.value());
}

//
// Note - In this example, I have used CommaIO class. But you can also use
// AsciiIO class as well. Basically all these classes (AsciiIO, CommaIO,
// Comma7Io etc) derives from 'Io' base class. For more info, please
// refer to Io class.
//
inFile = new CommaIO (filename, 'R');

if (!inFile || infile.status() != IO_Status::Ok )
{
//strfmt - function for formatting text string
throw error (strfmt("@SYS19312",filename));
}
ttsbegin;

// Set the delimiters
infile.inFieldDelimiter(';');
infile.inRecordDelimiter('|');

//Checking status of last operation
while (infile.status() == IO_status::Ok)
{
// Setting container according to datatypes
[itemId, itemName] = infile.read();
if (itemId)
{
if(!InventTable::find(itemId).RecId)
{
inventTable.initValue();
inventTable.ItemId = itemId;
inventTable.ItemName = itemName;
// These values must be set on their respective tables.
// Here the value are hard-coded into the import as the import
// serves a demo purpose only
inventTable.ItemGroupId = 'TST';
inventTable.ModelGroupId = 'TST';
inventTable.DimGroupId = 'TST';
inventTable.Insert();

// Values must be setup in inventTableModule, which in Dynamics AX 4.0SP2 has three valid arrayelements
// purch, sales, invent (DEL_smmQuotation is not included in this job)
for(counter = 0; counter <= 2; counter++)
{
inventTableModuleBuf.ItemId = inventTable.ItemId;
inventTableModuleBuf.ModuleType = counter;
inventTableModuleBuf.insert();
}

InventItemLocationBuf.ItemId = inventTable.ItemId;
InventItemLocationBuf.inventDimId = InventDim::inventDimIdBlank();
InventItemLocationBuf.insert();
}
}
}
ttscommit;
}

Please notice that the posting is provided "as is" with no warranties and confers no rights

Friday 4 April 2008

How to setup automatic sync with Seagates FreeAgent Go

Coming from XP to Vista is not as difficult as I would expect, though some of the software which I found indispensable in XP is not quite mature enough for a 64-bit version of Vista. One such piece of software is my automatic synchronization of documents to an external harddrive. In XP my FreeAgentGo 160GB external harddrive contained an exact copy of my documents folder - just in case - so big was the surprise when I tried to install the FreeAgent Tool on my 64-bit only to discover that the software wasn't supported on 64-bit OS'es. Having cussed for a while I tried to run the application in Windows 2000 compatability mode, and lo and behold, the installation ran perfectly and post-reboot, the sync is up and running again. Hurrah.