Sunday, July 3, 2016

Customize field in LedgerJournalTable/Trans flow to GL posted Record (Ex: generalJournalAccountEntry)

// Customize field in LedgerJournalTable/Trans
 flow to GL posted Record (Ex: generalJournalAccountEntry)

// Ledger Transaction
1) Create New field in Both GeneralJournalAccountEntry and LedgerJournalTrans/ledgerjournalTable
   and also in LedgerPostingTransactionTmp // Standard Tmp Table for GL posting Purpose
2) Declare Newly created field in Class --> LedgerVoucherOject
3) Create New Parm method for new field in Class --> LedgerVoucherObject
   sample method Code Ex
   public RegNo parmRegNo(RegNo _RegNo = RegNo) 
   { 
    RegNo = _RegNo; 
    return RegNo; 
   }
4) Declare Newly created field in Class --> LedgerVoucherTransOject
5) Create New Parm method for new field in Class --> LedgerVoucherTransOject
   Sample method Code Ex
   public RegNo parmRegNo(RegNo _RegNo = RegNo) 
   { 
    generalJournalAccountEntry.RegNo  = _RegNo; 
    return generalJournalAccountEntry.RegNo ; 
   }
6) Add code in method Class --> LedgerVOucherTransObject/getLedgerPostingTransaction
   Sample Code Ex
   ledgerPostingTransaction.RegNo = generalJournalAccountEntry.RegNo
7) Add code in method Class --> LedgerVOucherTransObject/initFromLedgerPostingTransactoin
   Sample Code Ex
   generalJournalAccountEntry.RegNo = _LedgerPostingTransaction.RegNo;
8) Add code in method Class --> LedgerVOucherTransObject/newTransLedgerJournal
   Sample Code Ex // here Std input buffer is journalTrans
   ledgerTransObject.parmRegNo("your field name from Master");

// Cust / vend / Bank Account Transaction Ledger with GeneralJournalEntry
1) Create New field in Both GeneralJournalAccountEntry and Cust/vend/Bank Transaction
2) Map --> CustVendTrans ( map newly created Field in AOT Map)
3) Class-->CustVendVoucher for Cust/vend Transaction
   Class--> BankVoucher for Bank Account Transaction
4) Declare Newly created field in Class
5) Create New Parm Method in class
   sample method Code Ex
   public RegNo parmRegNo(RegNo _RegNo = RegNo) 
   { 
    RegNo = _RegNo; 
    return RegNo; 
   }
6) Add Param Method in class--> ledgerVoucherTransObject
7) Add code in Class-->CustVendVoucher/initCustVendTrans
   custVendTrans.RegNo = RegNo;
8) For Customer/Vendor  Add Code in Class -->CustVendVoucher/Post
   For Bank Add Code in Class -->BankVoucher/Post
   ledgerVoucherTransObject.parmRegNo((RegNo);
9) For Cust Transaction Class-->CustVoucher/newCustVoucherJournal
   For Vendor Transaction Class--> VendVoucher/newVendVoucherJournal
   For Bank Account Transaction Class --> BankVoucher/createBankAccountTrans
   Sample Method Code Ex
   custVoucher.parmRegNo(RegNo);
// Soon i will write code for Budget and Asset ledger

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...