-->

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

maqk® by MolviDSLR Khan | 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 MolviDSLR Khan | 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.
Well first of all, I must write that this activity is not recommended by professionals. So first of all try to avoid such alternates and try to focus on better solution.

However with the intentions to share knowledge and skill ( and perhaps you have had no other option besides meeting stupid client requests ), i asm providing a javascript that will disalbe the browser back button. The button itself won't be disabled, it would be not functional. So here we go :)


Call it from desired page, add to the page's onload client event ( where you want to disable browser back navigational button)

<body onload="changeHashOnLoad();">

cheers, you are go on IE9 and Firefox 5 (my test browsers;) )

How to setup Android Development Environment

maqk® by MolviDSLR Khan | 12:35 AM

Yes its quite far away from the shadows of dotnet, yet its all about software. ehm ehm apps development. We divide our this post in w major sections:
  • Android Development Setup
  • Hello World program

Following are the ingredients you need to setup the Android Development Environment on your machine (I am not covering system requirements specific issue in this topic, I am supposing u know whats the difference b/w x86 x64, similarly Windows against Mac / OSX and Linux, the links below will be good for Windows 7 on x86 machine)
First of all (after making sure enough disk space lolz, my environment currently has 2.06 GB for Android SK, 200+MB for JDK and 289 MB for Eclipse)

Install the Android SDK, it requires JDK, so if u dont have it, the setup detects this and mentions for a download with download location provided in the setup navigation. Then you need to get an IDE, their are several, i m using eclipse and it would be ok.

Next is to enable your IDE (Eclipse in our case) for Android Development. Why do we need tp do this step explicitly is that Eclipse wont come with Android template installed in default. So you have to make it. For this, open Eclipse, GO to Help → Install new software. Following dialog will appear

paste https://dl-ssl.google.com/android/eclipse/ in the Work with text box
This will update the listbox below
Select all / relevant updates

Once this is done, go to Windows → Preferences, you should see Android option in the left list box. Select it. This will load the following dialog.


Uploaded with ImageShack.us
Provide the sdk location, apply and ok. This should complete your environment setup walkthrough. To ensure your Android SDK is integrated in your Eclipse IDE, select Window from the Eclipse main menu and u should see the new Android SDK option available, see image below;



Uploaded with ImageShack.us

Turn your Windows 7 laptop into a Wi-Fi Hotspot

maqk® by MolviDSLR Khan | 1:23 AM


Blog Story reader can keep reading if they dont get bored of my story telling strategies


Well I just bought an android phone, my friend and office colleague Zohaib Khalid sold me his Huawei IDEOS U8150 on installments, thank you once again dear friend. But this just started once again a AppUseAndDeveloo\p battle in me after I waited for almost an year on the Samsung B3410 dumb touch phone :(


Well, WAR i wrote cause these days, i m really low at spending ( will write abt it some time later in life when it gets more relevant :) ) and so i just was not able to spend on the expensive GPRS by zong. So i needed a wifi device, and the best was costing 7K PKR (some 82 US$, too much for me MAN ). This is what initiated a new mission type thing, how to save money. I knew my DELL 1555 was wifi enabled, and as a default I thought I can host a wifi connection as well. But this was not true, I did crazy thing under network and sharing center (using windows 7) and nothing gave fruits cause i never knew.

Untill another of my office colleague Nabeel Faruqui told me about Virtual Router (http://virtualrouter.codeplex.com/)

Review interested people read from here
It works for sure, my android is just connected to this Virtual Router powered internet connection shared wifi
netwok. It is super but just need to provide more help to end user.

My exprience is awesome, but with one hickup. First I need to tell a brief abt my hardware and setup, so here we go;

  • DELL 15 Studio (1555)
  • Windows 7 Ultimate,
  • Inter WiFi Link 5100 AGN (wifi device)

You just download the setup, run it, it would install an application, restart the pc, you get a Virtual Router Manager v 0.9 beta sitting in your system tray with 2 textboxes and a drop down asking to enter connection parameters and a button as well saying 'Start Virtual Router'. And at this point, u must be thinking that by selecting my internet connection in the drop down and hitting the start bittin, i will get connected, but thats where u get the ONLY BIG BLOW in this software. Actually it would end all your hopes by just saying 'Virtual Router can not be started'.

Too bad it does not say anything more than that. It should be more meaningfull to find atleast what went wrong, it really misguides an end user here. However that said, it does not mean it just cant or wont work, this is why i started by saying 'IT WORKS, NOT FAKE.'

But u have to be a bit techy to experiment. You have to do a bit more than just hitting the start button. Since it is asking a wireless network to share as a wifi hotspot, it would require one, and your Internet connection is not the wireless connection u r connected to which can be used here, perhaps the internet connection can ONLY be shared on a pc to pc or a local LAN WAN type connection which u need to provide to the Virtual Router.
I solved it easily by

  • going in the Network and Sharing Center,
  • Clicking the 'Setup a new connection or network', first choice under 'Change you networking settings'
  • This opens a popup window, select the last choice saying 'Setup a wireless ad hoc (computer to computer)'
  • This would bring the next window with the heading 'Setup a wireless ad hoc (computer to computer)', just press next
  • Would ask your wireless network connection parameters like Network name, security type and security key (password), enter these details as you require and hit next
  • A new window saying the 'your entered network name' network is ready to use.
  • Click close, This step actually has created a new virtual wireless connection under your device manager with the name 'Microsoft Virtual wifi Miniport Adapter'.

With all these details, my point actually is the above 5-6 steps are to be repeated each time you have to start the virtual router which is quite annoying. And not every end user can do it. Plus to this issue, no help whatsoever given to direct or walkthrough for endusers which is not good, if a person like me write a few lines in 20 minutes, then the team should provide more hepl I believe.

That said, Virtual Router is a gr8 thing, for me it is heaven cause it saved my 7K PKR rupees (just 82.something US$ :) ) to buy a wifi router and now i enjoy 36 MbPS wifi link on my Android. Dear tea, just increase the help and walkthrough, of course my review is not dead precise, i might have missed details im my points, i just want to help.

Some screenshots are atatched to easi-fi your wifi setup xp ;)


top