Alfasith AX

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

Sunday, October 14, 2018

Error: "The model element was saved with unparsable source code and cannot be used".

Hi,

This is error because of multiple times changes in the blocks of code. This is the error on building a recent changes which is not affecting by last changes.

Solution.

1. Take a complete old code in to Notepad and save the class and built the object.
2. Now replace this blocks of code with the buffer you have in clipboard.
3. You may save and build now.

Thanks,


Wednesday, June 20, 2018

Relation between ProjPostTransView and PurchOrder

Hi

Add the ProjTransId in to that view from ProjItemTrans.

display PurchId PurchId()
{
    PurchLine       PurchLine;
    ProjItemTransView   projItemTransView;
    InventTransOrigin       inventTransOrigin;
    ProjItemTrans           projItemTrans;
    ;
    if(this.ProjTransId)
    {
        select projItemTrans where projItemTrans.ProjTransId == this.ProjTransId;
        select PurchLine where PurchLine.ProjTransId == projItemTrans.ProjTransIdRef
                                        && PurchLine.ItemId == projItemTrans.ItemId;
        //select InventTransId from projItemTransView where projItemTransView.ProjTransId == this.ProjTransId
        //join inventTransOrigin where inventTransOrigin.InventTransId == projItemTransView.InventTransId;
        return PurchLine.PurchId;
    }
    else return "";
}

Thanks,

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...