Alfasith AX

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

Monday, April 14, 2014

To get time difference in Dynamic AX


Hi,

DateTimeUtil::getDifference(DateTimeUtil::getSystemDateTime(), AnotherDateTime)
//Here time components of both the fields are taken out and its difference is being calculated.

Regards,


Sunday, April 13, 2014

Container and unbounded string (text) fields are not allowed in a WHERE expression in AX.

Hi,

public void init()
{
    str 30             TimeSheetID;
    DNTimeSheet     LocTimeSheet;
    ;
    super();
    // Check for passed arguments
    if( element.args() )
    {
        // get string parameter
        TimeSheetID = element.args().parm();
        select DNTimeSheet where DNTimeSheet.TimeSheetNum == TimeSheetID;
        ProjectIDFeild.text(ProjID);
        info(strFmt(ProjID));
    }
}

Here TimeSheetID thrown this error.
Solution is  just I declared Str 30 TimSheetID instead of Str TimeSheetID

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...