-->

Writing your first X++ "Hello Word!" program

maqk® by Unknown | 5:44 PM

Programming the forms is not all too different in Dynamics as in in Visual Studio. Of course VS is a generic tool whereas MorphX (Dynamics IDE) is only specific to Dynamics.

But again the point is that too many things could have been similar, yet they are different for some purpose. And to learn those purpose is the real learning goal.

In MorphX, the world is squeezed into AOT (Application Object Tree). This features all tables, forms, EDTs, Classes, Menus, Items etc. So if you just wanna try out some basics X++ syntax, then Jobs is the right node for you.
  Image Hosted by ImageShack.us

This would enable you to test anything the X++ language offers under the dynamics framework. For example, you can display a simple "Hello Dynamics World!" message box,   you can iterate a whole DirParty table. You can even delete records, do further business operations whatever. Image Hosted by ImageShack.us

Creating a Sample Job

By right clicking the job node, you get the context menu. Click New Job. This would open a new sub window with a static method
 

Hitting F5 would run / start the job. For the above job, the output is attached just below;

As you can see, a few table names are returned. One thing to note is that one dialog / message box is showing all the messages displayed in the job, eliminating the one by one re appearing of a new message box for each :)

The code in the attached snap is as follows;

smmProcessInstance objsmmProcessInstance= new smmProcessInstance();

info(Global::tableId2Name(2254));

Their are 9 distinct calls to the info method, each calling another method, 'tableId2Name()' which takes table Id as parameter. I have provided hard coded table IDs their. Actually I was trying to find out what these tables are since these table IDs were referenced along with record reference Id field. These are Rec id based relations, an advanced topic that we will discuss in some other post.

Create a new Job, this will give you an empty 'static void Job1(Args _args)' method. Write inside the code

info("Hello Dynamics World!");

and Hit F5, You will get the message box with the above written text. Welcome to Dynamics coding :D

Welcome to Dynamics AX 2012

maqk® by Unknown | 3:08 PM

My whole career is full of twists and turns. But this is perhaps the biggest one. Now I am a Dynamics AX developer Alhamdulillah.

Dynamics AX 2012 is a whole new thing. THe language we are using to code in dynamics is X++. Its quite a bit like C# in basic syntax but it overall, it has too many differences to offer.

At the moment, I am getting used-to of the language which should really be not a big deal, because the real big deal is to learn the mode of the AX platform, the way you are supposed to work here. Its completely different. You have to program exactly the way the system want you to. For this, the system implements standards and best practices violating which would cause debug errors. So you have to learn  how different chunks of business components, best practices & frameworks are connected to each other to get the GOOD out of Dynamics.

As a start, I am sharing with you guys the most important thing one has to learn and focus on its learning path, and these are the frameworks.

Dynamics AX 2012 Frameworks

here you go: Dynamics AX 2012 Frameworks

I will post each thing I learn in this experience, hope I would make things a lot more easier which were not there for me.
top