Wednesday, 3 February 2016

How to Invoice Purchase order through code in Ax 2012

static void Raj_POInvoice(Args _args)
{
    PurchFormLetter     purchFormLetter;
    PurchTable          purchTable;

    purchFormLetter = PurchFormLetter::construct(DocumentStatus::Invoice);
    purchTable = purchTable::find("Yours Purch id");
    purchFormLetter.update(purchTable, 'Yours Purch id',today());
    info(strFmt("purchase order %1 invoiced",purchTable.PurchId));

}

No comments:

Post a Comment