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 :)

Exception Handling in Dynamics 365 For Finance and Operation

When we write a code, or make a customization to Dynamics 365 For Operation which is using X++ should make use of Exception Handling to p...… Continue reading

Basic C# OOP Concept

Published on April 10, 2017