20 Nisan 2012 Cuma

AXAPTA - Using common DLL

Put your DLL file at Client\Bin at  Axapta folder under Program Files. That folder's name is :
C:\Program Files (x86)\Microsoft Dynamics AX\50\Client\Bin\
at my PC.


Set parameters with extTypes enum at Arg method. Sample usage:


void Test()
{
    DLL                 testDll;
    DLLFunction         test;
    ;

    testDll = new DLL("MyTestDLL.dll");
    test = new DLLFunction(printDLL, "MyTestingMethod");
    test.arg(extTypes::Word ,extTypes::String);
   test.call(12345,"ABCDE");
}

6 Nisan 2012 Cuma

AXAPTA - ascii character and string length

mylen = StrLen("my string...");

my_first_chr = num2char(65);

AXAPTA - Declare global function

Add your static method at AOT->classes->Global:

public static void Test()
{
;
info("my global function");
}

***
static void TestMyGlobalFunction(Args _args)
{
;
test();
}

AXAPTA - Trimming a string

static void Job47(Args _args)
{
str a;
;
a=StrRtrim("fdssf ");
a=StrLtrim(" fdssf");
}