Skip to main content

Posts

Showing posts from 2014

Debugging AIF Service in AX2012

Hi Guys, In this post we’ll take a closer look at debugging AIF services in Dynamics AX 2012. Debugging is a critical part of the development process as it helps you identify any defects in your code, so you can fix them. The MorphX integrated development environment (IDE) provided by Dynamics AX provides excellent support for debugging X++ code, and you can use it to inspect X++ code that is part of your Dynamics AX Jobs, Reports, Forms, Tables, etc. But when it comes to debugging AIF services in Dynamics AX 2012, you can’t rely on the in-environment debugging capability of the MorphX IDE alone. Granted that you can use the Jobs feature in to help you debug the service classes while staying within AX, but debugging a service call that is triggered from outside by some client consuming the AIF service, can’t be done while staying within MorphX. For that you will need to utilize the debugging capabilities provided by Visual Studio. Here’s how you can do that. Debugging AIF Services in Dyn…

AX2012 R3: Lookup in Issue Search

Today’s post will be on AX2012 R3: Issue search
Guys this is one of the wonderful feature introduced in R3 release, you sometimes find the different kind of issues in AX, so this is the page which provides you hot fixes released for AX 2012 and you will be able to look at the KB number and the release date (if applicable).
As shown below, “Lookup in Issue Search” is available under all the AOT objects. Here I’ve just navigated to AOT >> Tables >> CustTable and right clicking and Add-Ins provided me the option:




And clicking on the search, opens up the new browser [To login as customer/Partner], where you can login.




Now on the below page you can have a look how it filters with then current AOT object, and shows all the hotfixes and KB article recently updated by MS. 




Hope you all like it. Keep daxing J Enjoy R3



Filter on AX2012 Listpage

Hi Folks J
Today’s post will help you when you need to have customize filter on list page form in AX 2012:
As shown below:
















Shown above is “smmActivitiesListPage” where we have 3 different filter fields: Activity number [String]Responsible [Reference group]Status [Customized Enum field, which consist of 3 element: All, Open, Closed]
Let’s observe how each of this helps in filtering smmActivities record on the list page.
 Activity number field [string] This is the normal string field added in the group filter of ListPage, and assigned the corresponding EDT [smmActivityId] to get appropriate lookup. As shown in field properties “FilterExpression” is the one which we input in the filter box, “FilterDatasource” provides the datasource under form which need to be filtered and “FilterField” is the one which need to be filtered in the datasource field.



Responsible worker: As we do not have direct string field to select the employee name, so using the smmActivityWorker EDT under reference group to dis…

AX 2012 / AX 2009: Layers object

Hi folks J today am going to illustrate the sample code which helps you in finding all the different objects in the specified layers.
So Running the below code opens a dialog wherein we can select the layer as shown:


AX2012:
static void LayerObjectsAX2012(Args _args) {     #AOT     treeNode treeNode;     xInfo xInfo = new xInfo();     UtilElements utilElements;     str layer;     int counter = 0;     textBuffer textBuffer = new textBuffer();     dialog dialog = new dialog("Find the modified objects");     dialogfield layerTypeDf;     ;     layerTypeDf = dialog.addField(enumStr(utilEntrylevel),"Choose the layer");     if(dialog.run())     {         treeNode = treenode::findNode(#TablesPath);         treeNode = treeNode.AOTfirstChild();
        while (treeNode)         {            if(SysTreeNode::existsInLayer(treeNode, layerTypeDf.value()))            {
             textBuffer.appendText(treeNode.AOTname());              textBuffer.appendText('\n');              counter ++;          …

Microsoft Dynamics AX 2012 X++ Editor Extensions

AX2012: Open Word Application through X++

Just a small snippet to demonstrate, how we can open Microsoft word application through X++.
And this would be really significant when you want certain things to move from AX to Word for example print screen of AX forms to MS Word.
And here is the code:
Ex#1: static void OpenWordTemplate() {   COM wordApp;   COM wordDocuments;   wordApp = new COM("word.application");   wordDocuments = wordApp.Documents();
  wordDocuments.Open("c:\\CustomerDocument.docX");   wordApp.visible(true); }
Ex#2: static void WordSaveAs() {
  COM wordApp;   COM wordDocuments;   COM wordDocument;   COM wordRng;
  wordApp = new COM("word.application");   wordApp.visible(false);   wordDocuments = wordApp.Documents();   wordDocument = wordDocuments.add();   wordRng = wordDocument.range(0,0);   wordRng.insertafter("Customer account information");
  wordDocument.SaveAs("C:\\CustomerDocument.doc");
  wordApp.visible(true); }

Happy Dax6ng J