Alfasith AX

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

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,

No comments:

Post a Comment

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