Tuesday, 22 March 2016

Display Methods

Item Name:

 display ItemNameDisplay itemName(Common _common = null)
    return InventTable::find(this.ItemId).itemName();



 display ItemGroupId ItemGroup(Common _common = null)
    return InventTable::find(this.ItemId).itemGroupId();


display real callupQty()

    InventTrans     inventTrans;
    SalesLine       salesLine;
    InventTransOrigin inventTransOrigin;

     select sum(Qty) from inventTrans
        where     inventTrans.ItemId == this.ItemId
        join inventTransOrigin
        where inventTransOrigin.RecId == inventTrans.InventTransOrigin
        join   salesLine
        where salesLine.InventTransId == inventTransOrigin.InventTransId
        &&    salesLine.PlanDate >= DateStartMth(this.PlanDate)
        &&    salesLine.PlanDate <= endmth(this.PlanDate);

    return -inventTrans.Qty;



public void insert()

    ItemReference       itemReferenceLoc;

    select count(RecId) from itemReferenceLoc;

    this.LineNum = itemReferenceLoc.RecId + 1;



No comments:

Post a Comment

Excel data connector in AX7/D365

Excel data connector in AX7: Configuring and using the Excel Data Connector Add-in The Excel Data Connector add-in is built by usi...