Thursday 10 May 2012

Using .NET framework directly in X++



This facilitates the developers having knowledge of the .Net Framework. They could use them directly in X++ to enhance the custom features in Dynamics AX.
static void main(Args args)
{
//  System.DateTime is from .Net Framework
//  This is a sample to show how the Framework can be used along with X++ coding.

    System.DateTime     now;
    str                 getDateStr;
    ;
    
    now = System.DateTime::get_Now();
    getDateStr = now.ToString();
    info("It is now : "+getDateStr);
}  
Developers could also develop and use the custom DLL's designed in Visual Studio 2008. In order to use the Custom DLL, it should be copied to the Dynamics AX installation path 'Client\Bin' folder. Adding references in Dynamics AX to those custom DLL's you can start using them in X++. The default path of deploying the new .Net DLL is as follows
[DRIVE]:\Program Files\Microsoft Dynamics AX\50\Client\Bin
Note : Dynamics AX 2012 only supports the higher version Visual Studio 2010 and .Net Framework 4.0.

No comments:

Post a Comment