Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Wednesday, February 26, 2014

Progress (Loading) bar animation in Dynamic AX 2012

Hi,
static void progressBars(Args _args)
{
    #AviFiles
    SysOperationProgress progress = new SysOperationProgress();
    int i;

    ;

    progress.setCaption("Loading…");
    progress.setAnimation(#AviUpdate);
    progress.setTotal(50000);
    for (i = 1; i <= 50000; i++)
    {
        progress.setText(strfmt("The value of i is %1", i));
        progress.setCount(i, 1);
    }
}


Tuesday, February 25, 2014

Round off the decimal in Dynamic AX 2012

Hi,
//To round off all digit after decimal.
static void roundOff(Args _args)
{
real numb;
;
    numb = trunc(4.68989);
    print strfmt("Round off number= %1",  numb);
    pause;
}

Out put

Round off number= 4.00

Regards,

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...