60) D365 FO – CLOSING AND ADJUSTMENT USING X++/INVENTADJ

Requirement – Closing and adjustment – Revaluation for moving average using X++

Sample Code –

static void Job258(Args _args)
{
    InventDataAdjSumUp  dataAdjSumUp;
    InventDimParm       inventDimParm;
    InventClosing       inventClosing;
    InventAdj_SumUp     inventAdj_SumUp;
    TmpFormLookUp       tmpTbl;
    AcxInventRevalueTable acxInventRevalueTable;
    boolean             adjustClosing;

    tmpTbl.clear();
    tmpTbl.initValue();
    tmpTbl.itemId =  itemId;
    tmpTbl.InventDimId = InventDimId;
    tmpTbl.qty = qty;
    tmpTbl.postedValue = postedValue;
    tmpTbl.adjustNow = adjustNow;
    tmpTbl.LineNo = LineNo;
    tmpTbl.insert();
    
    dataAdjSumUp  = InventDataAdjSumUp::newFromForm(tmpTbl);

    inventAdj_SumUp = InventAdj_SumUp::newSumUp(dataAdjSumUp.pack(),inventDimParm
        , today(), false
        // <GEERU>
        ,InventTransCurrency_RU::PrimaryCur
        // </GEERU>
    );

    inventAdj_SumUp.run();
}

Comments

Popular posts from this blog

Customization on Sales invoice Report in D365 F&O

75) COC - Create a coc of the table modified method

46) D365 FO: SHAREPOINT FILE UPLOAD USING X++