Microsoft Dynamics AX Developer Center Headlines

My Card

Tuesday, August 7, 2012

AX 2012 Retail Technical Conference Recordings

Want to share the AX 2012 Retail Technical Conference Recordings link, These recordings are available at partner source. You need partner source access to view the recordings -

Tuesday, March 13, 2012

Thursday, April 21, 2011

Microsoft Dynamics AX 2012 Documentation Resource Whitepaper

Microsoft has released a documentation resources whitepapaer for Microsoft Dynamics AX 2012 which has overview of the resources available for Microsoft Dynamics AX 2012 at one single location. It is available to download from following link - Download Documentaton Resource Whitepaper

Tuesday, April 12, 2011

New private ERP cloud offering by Avanade

Avanade Inc has announced Avanade new Private Cloud Enterprise Resource Planning Offering on Microsoft Dynamics AX.

Microsoft Dynamics AX 2012

Microsoft Dynamics AX 2012 material is publically available at Microsoft link.

Friday, July 23, 2010

Get the current navigation pane area through program

Getting the current opened navigation pane area for the use through program might be useful where you want to perform an action depending upon in which module user is currently working. For ex: You might want to show the docuref comments depending upon the opened module or navigation pane.
static void GetCurrentNavPaneArea(Args _args)
{
xInfo objxInfo;
xNavPane objxNavPane;
Treenode objTreeNode;
xTaskPane xtask;
Treenode t;
;
objxInfo = new xInfo();
objxNavPane = new xNavPane();
objTreeNode = objxNavPane.getSelectedPlacesNode();
info(objTreeNode.AOTparent().treeNodeName());
}

Monday, June 7, 2010

AIF – Web service Configuration - Troubleshooting

I was working with AIF web services configuration on Win server 2008-r2, AX 2009, and IIS 7.0 machine and faced errors during configuration. I thought it might be useful for everyone to share with:
  1. If you get the 404 error while accessing the service URL, then it might be because WCF is not registered. Consider registering Windows Communication Foundation (WCF) with IIS. To register WCF If IIS has installed after .net framework then use below options


    1. Open command prompt and set the directory path to WCF directory, which is usually, C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
    2. Run the following command: ServiceModelReg.exe /i /x Refer tech-net link for more detailed information.

  2. If you face the error shown in below image after registering the WCF then check the below points to get rid of the error:


  • Check that the windows authentication has enabled for AIF virtual directory.

  • Following should be the binding section of web.config file available in virtual directory physical path:


  • Enabled providers for virtual directory are NTLM and Negotiate both:


I was able to make the web service work after these troubleshooting steps. Hope these might be a help to anyone.

Tuesday, March 2, 2010

Burn an ISO to bootable media

I was trying to burn the windows server 2008 r2 ISO image into a DVD as bootable. I found a useful tool by our own Microsoft while doing the R&D over internet on various freeware's. This tool is freely available currently at Microsoft Store site and very easy to use. The name of the tool is WINDOWS 7 USB/DVD DOWNLOAD TOOL. It can create write the ISO file into DVD\USB drive and make it bootable. You can download this tool from: http://images2.store.microsoft.com/prod/clustera/framework/w7udt/1.0/en-us/Windows7-USB-DVD-tool.exe

For further information or help on the tool please visit: http://store.microsoft.com/help/ISO-tool

Saturday, February 27, 2010

Virtual Box (.vdi) image optimization

About Virtual Box:

Virtual box is a virtualization product developed by sun micro system. You can create a 64 bit guest machine and host it on a 32 bit OS using virtual box. For more information on virtual box visit: http://www.virtualbox.org/

Optimize Image

Below steps explain the required procedure to compact the size of a virtual box image (.vdi).

  1. Zero free space in .vdi image:

    The first step in the optimization process is to free up the unallocated space from the image. You need to follow below mentioned steps for the same:

    1. Start the virtual box image.
    2. Download the SDelete tool from http://download.sysinternals.com/Files/SDelete.zip & extract it to a folder say C:\SDelete drive in the image.
    3. Run the command prompt and type following command to run the SDelete utility:

      sdelete –p 3 –c C:

      Note: If you have multiple drives then run the utility for both of the drives. For more information on SDelete utility visit: http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

    4. Shut down the virtual box image.
  2. Compact Virtual Box image:

    Second & final step in optimization process is to compact the virtual box image size using VBoxManage utility. VBoxManage utility can be found at the installation folder of virtual box usually "C:\Program Files\Sun\VirtualBox".

    1. Run the command prompt and run the following command:

      C:\Program Files\Sun\VirtualBox\VBoxManage modifyhd "D:\Virtual Box\Server.vdi" –-compact

    2. You will get the optimized virtual box image after this step. Notice that you will be able to free up some good amount of space from the imageJ.

Tuesday, January 19, 2010

Send mail through X++ code by using the predefined e-mail templates in AX

Microsoft Dynamics AX provides the functionality to send the mail during various processes. Microsoft Dynamics AX has classes and tables to support these. You can send an e-mail by creating the message body at run time, basically a string object. In this case the end- user does not have the option to change the text in message body; this can be done via code only. However you can specify the e-mail template in AX and use that while sending the mail. You can define the message body (static text which is common for all the messages) in the e-mail template with the parameters (dynamics text which can be added at run time). You can then pass the values to the specified parameters in e-mail template at run time. This provides the flexibility to user to change the e-mail text if he needs to do so. However parameter can be changed by little modification in code.
The e-mail format can be specified at Basic Module -> Setup -> E-mail templates. Microsoft Dynamics AX Alert functionality uses the pre-defined e-mail template to send the alert notification mail.


Business Requirement:
I considered the requirement of sending the e-mail notification to employee when his absence request will get approved or rejected. Employee will register for his absence at absence registration journal located at Human Resources Module -> Journals -> Absence -> Registration form as shown below:


Once employee will transfer his request then the vacation approval request will appear for the absence approver at Human Resource -> Journals -> Absence -> Approval form as shown below:


Now the absence approver can approve or reject the request, in either case we will notify the employee by mail using the specific e-mail template stored at Basic -> Module -> Setup -> E-mail template form.



Define Email Template:
E-mail templates can be defined at Basic Module -> Setup -> E-mail template form. I have created an e-mail template ‘Blog’ which I will use in this exercise to send the mail.


Here I have defined the languages in which I want to send the mail & selected the template layout as HTML. You can define your template in either HTML or XSLT. I have used HTML layout for my blog. You need to define the template for each language.



To define a parameter you need to enclose it in % as shown above. In the above template I have defined 6 variables to which I will pass the values through code at run time.

Setup Email Parameters:
To send the e-mail I am using the SMTP server & respective port. You can define them at Administration -> Setup -> E-mail parameters form as shown below:


Implementation Details:
Note: Please follow the Dynamics AX business process guide for absence related setup.
In this article I will use employee Id 1000, name Charlie Carson to request for absence approval. I will use employee 3100, name: Tony Krijnen as an absence approver. E-mail id for both employees has been setup, & I will be fetching them while sending the mail.
To implement the absence notification to employee through mail, I have written a class named AbsenceNotification. This class has following methods:
1. New: I have overridden the new constructor in the class. This will be used to initialized HRMAbsenceTable and the approval status. For the same I am passing two parameters to constructor:
a. HRMAbsenceTableId – To initialize the HRMAbsenceTable
b. Status – a boolen true of false value, if called from HRMAbsenceApprove class, I am passing true and if called from HRMAbsenceReject class I am passing false.


2. getStartDate: This method is used to get the start date of absence request.


3. sendAbsenceNotification: The notification implementation code is written in this method. Below are the details:
a. Initialize the HRMAbsenceTrans table to get the last record in transaction table for absence request. This is required to get the end date of absence request.
b. Created a map object to pass the values to parameters I have defined in the e-mail templates.
c. Send mail by using the SysEmailTable::sendMail method, where we need to pass the e-mail template id to be used, default language, recipient mail id and the map which has the values for the e-mail template variables.

There are 2 AX classes which will be called by Dynamics AX as per the Approver’s action i.e. Approve or Reject. To approve absence request Dynamics AX uses the class HRMAbsenceApprove & to reject absence request it uses the class HRMAbsenceReject. Now we need to call the code in HRMAbsenceApprove & HRMAbsenceReject class’s mail method to send the mail at the time of approval or rejection.

The system will send the e-mail to notify the absence status to employee. It will use the e-mail setup for employee in employee contact information. Below is the snap shot of mail:


About X++:
X++ is the object oriented class based single dispatch programming language, in Microsoft Dynamics AX.

Disclaimer- I have not tested the code completely and it may have bugs in it. The code I have written is for demonstration purpose only therefore not following best practices in this example code.

Monday, January 11, 2010

Microsoft Dynamics AX Retail

Microsoft has released the Dynamics AX retail offering recently. Please find more information related to this at http://www.microsoft.com/dynamics/en/us/industries/retail.aspx.

Saturday, April 25, 2009

Change an AX Bound Field to Hyperlink bound field in web user control

There are certain situations where we need to change an AX bound field to AX Hyperlink bound field in a web user control. I have listed out the required steps which need to be performed in order to do the needful.
1. Open the Web user control in visual studio. For detailed information on how to open a web user control & edit in Visual Studio please refer the AX Developer help.
2. Once you have the web user control added to web project in VS, open the HTML source of the control.
3. Replace the AxBoundField tag with the AxHyperLinkBoundField tag for desired column. Make sure to replace the end tag as well.
4. Now switch back to Design mode, select the grid and click on Edit Columns to edit the column property.
5. You will notice that the MenuItem property is enabled for the changed field as it is now hyper link bound field. This property will only be available for AXHyperLinkBoundFields.
6. Provide the menu item (AX Webmenuitem of type URL object) name to the property to set the hyperlink.
7. Follow the standard AX procedure to deploy the changes back to AX. For more detailed information on how to deploy the changes back to AX please refer Dynamics AX developer help.

Wednesday, November 19, 2008

Presence Information in Microsoft Dynamics AX 2009

Microsoft Dynamics AX 2009 now has integration to Office Communicator. This allows a user to see presence information of a contact & contact him instantly. Office Communicator is required for this purpose.
We can enable the presence information in a AX Form Control of type StringEdit by setting up the following properties:
1. PresenceIndicatorAllowed: If set to Yes then it will show the presence indicator sign in same control.
2. PresenceDataSource: Data source which will have the PresenceDataField information.
3. PresenceDataField: It should be the field for address book identification such as DirPartyId, ContactPersonId etc. These are the extended data types.
These extended data types are having the properties to call the Presence Class (DirPresenceInfo) & the respective method. These Properties are PresenceClass & PresenceMethod.
For ex: The DirPartyId field the Presence Class property is set to DirPresenceClass & the PresenceMethod property is set to "partyInfo".
The contact information should be available in the respective table. For ex: for an employee the contact information should be available & the Communicator Sign In address check box should be checked to use the feature.