posting Cust payment journal using X++

Base on JournalId on LedgerJournalTable you can use code below for posting into transactions

//Contract class
public LedgerJournalId parmJournalNum(LedgerJournalId _journalId = gJournalId)
    gJournalId = _journalId;

    return gJournalId;

//Processing class
public void process(MAV_PostCustPaymentJourContract _contract)
    LedgerJournalTable      ledgerJournalTable;
    LedgerJournalCheckPost  postCustPaymentJournal;

    ledgerJournalTable = LedgerJournalTable::find(_contract.parmJournalNum());
    if (ledgerJournalTable)
        postCustPaymentJournal = LedgerJournalCheckPost::newLedgerJournalTable(ledgerJournalTable, NoYes::Yes);;

Max Nguyen

Max Nguyen
MCP - Microsoft Dynamics AX Technical Consultant, currently living and working in Seoul, S.Korea :)

Number sequence farmework overview in Dynamics AX 2012

How to create number sequence in Dynamics AX 2012 with difference scenarios Continue reading

Overview delete action in Dyanmics AX 2012

Published on January 19, 2017

Response in AIF custom service class

Published on January 12, 2017